NetworkManager r3257 - in trunk: . src



Author: dcbw
Date: Sat Jan 19 16:02:44 2008
New Revision: 3257
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3257&view=rev

Log:
2008-01-19  Dan Williams  <dcbw redhat com>

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



Modified:
   trunk/ChangeLog
   trunk/src/nm-manager.h

Modified: trunk/src/nm-manager.h
==============================================================================
--- trunk/src/nm-manager.h	(original)
+++ trunk/src/nm-manager.h	Sat Jan 19 16:02:44 2008
@@ -96,4 +96,17 @@
                                                          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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]