func (this *dbusPropertyRemoteEntryData) GetValue() interface{} /*map[string]string*/ {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "dde.dock.Entry", "Data").Store(&r)
	if err == nil && r.Signature().String() == "a{ss}" {
		return r.Value().(map[string]string)
	} else {
		fmt.Println("dbusProperty:Data error:", err, "at dde.dock.Entry")
		return *new(map[string]string)
	}
}
예제 #2
0
func doGetSettingVpnPluginData(data connectionData, isSecretKey bool) (vpnData map[string]string, ok bool) {
	vpnSectionData, ok := data[sectionVpn]
	if !ok {
		return
	}
	var variantValue dbus.Variant
	if isSecretKey {
		variantValue, ok = vpnSectionData[NM_SETTING_VPN_SECRETS]
		if !ok {
			return
		}
	} else {
		variantValue, ok = vpnSectionData[NM_SETTING_VPN_DATA]
		if !ok {
			return
		}
	}
	vpnData = interfaceToDictStringString(variantValue.Value())
	return
}