2008-01-19 Dan Williams <dcbw@redhat.com>

* src/nm-manager.h
		- (nm_manager_get_connection_type): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3257 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-01-19 16:02:44 +00:00
parent 5bfebe6b2f
commit 781266b5a2
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-01-19 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h
- (nm_manager_get_connection_type): new function
2008-01-19 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c

View file

@ -96,4 +96,17 @@ NMConnection * nm_manager_get_connection_by_object_path (NMManager *manager,
NMConnectionType type,
const char *path);
static inline NMConnectionType
nm_manager_get_connection_type (NMConnection *connection)
{
NMConnectionType type;
g_return_val_if_fail (NM_IS_CONNECTION (connection), NM_CONNECTION_TYPE_UNKNOWN);
type = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), NM_MANAGER_CONNECTION_TYPE_TAG));
if (type != NM_CONNECTION_TYPE_USER && type != NM_CONNECTION_TYPE_SYSTEM)
type = NM_CONNECTION_TYPE_UNKNOWN;
return type;
}
#endif /* NM_MANAGER_H */