forked from BellerophonMobile/gonetworkmanager
-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
The C library has a bunch of #defines for keys used in various maps. e.g. from nm-setting-wireless.h:
#define NM_SETTING_WIRELESS_SETTING_NAME "802-11-wireless"
...
#define NM_SETTING_WIRELESS_SSID "ssid"
#define NM_SETTING_WIRELESS_MODE "mode"
#define NM_SETTING_WIRELESS_BAND "band"
#define NM_SETTING_WIRELESS_CHANNEL "channel"
#define NM_SETTING_WIRELESS_BSSID "bssid"Could these bindings define a similar set of Go consts to reduce the possibility of typos? Or would specific getter methods be more appropriate?
There are also various defines and enums etc for values, such as:
#define NM_SETTING_WIRELESS_MODE_ADHOC "adhoc"
....
typedef enum { /*< flags >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_NONE = 0, /*< skip >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY = 0x2,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT = 0x4,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC = 0x8,
...
} NMSettingWirelessWakeOnWLan;There are lots of nm-setting-*.h though and it would be a lot to maintain all of them, but perhaps ad-hoc/as needed coverage could be acceptable?
Metadata
Metadata
Assignees
Labels
No labels