On Wed, 2008-03-05 at 15:19, Carsten Haitzler wrote:
> On Sat, 1 Mar 2008 22:46:27 +0100 Stefan Schmidt <[EMAIL PROTECTED]>
> babbled:
> 
> hey stefan... can you send the patches attached to a mail - not inlined?

Sure. I attached all patches to this mail. No difference to the
earlier ones.

> mailers like to linewrap and such. by sending as attachments you'll make sure
> that we get the patches exactly as you generated them whitespace for
> whitespace :)

I know. For review purpose some people like the patches to be inlined,
so they don't have to open the attachment. (Good mailers will allow
you to have txt attachments quoted in a reply anyway).

And going my way with sending out ready patches from git or quilt via
mutt I never had a problem with linewrapping and whitespaces. :)

Still I note for myself that patches for E are preferred as
attachment. Just a matter of taste and I'm fine following the best
practices of the project.

regards
Stefan Schmidt
>From cd95ba6c77fe59fa2943efb408c728165d3c9870 Mon Sep 17 00:00:00 2001
Message-Id: <[EMAIL PROTECTED]>
From: Stefan Schmidt <[EMAIL PROTECTED]>
Date: Sat, 1 Mar 2008 01:26:12 +0100
Subject: [PATCH 1/5] Add comments for dbus peer functions.

Add comments for dbus peer functions.

---
 src/lib/dbus/e_dbus_interfaces.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/lib/dbus/e_dbus_interfaces.c b/src/lib/dbus/e_dbus_interfaces.c
index 429e62e..772543b 100644
--- a/src/lib/dbus/e_dbus_interfaces.c
+++ b/src/lib/dbus/e_dbus_interfaces.c
@@ -6,6 +6,15 @@
  * objects on the bus should implement.
  */
 
+/**
+ * Ping the dbus peer
+ *
+ * @param conn the dbus connection
+ * @param destination the bus name that the object is on
+ * @param path the object path
+ * @param cb_return a callback for a successful return
+ * @param data data to pass to the callbacks
+ */
 EAPI void
 e_dbus_peer_ping(E_DBus_Connection*conn, const char *destination, const char *path, E_DBus_Method_Return_Cb cb_return, void *data)
 {
@@ -15,6 +24,15 @@ e_dbus_peer_ping(E_DBus_Connection*conn, const char *destination, const char *pa
   e_dbus_message_send(conn, msg, cb_return, -1, data);
 }
 
+/**
+ * Get the UUID of the peer
+ *
+ * @param conn the dbus connection
+ * @param destination the bus name that the object is on
+ * @param path the object path
+ * @param cb_return a callback for a successful return
+ * @param data data to pass to the callbacks
+ */
 EAPI void
 e_dbus_peer_get_machine_id(E_DBus_Connection*conn, const char *destination, const char *path, E_DBus_Method_Return_Cb cb_return, void *data)
 {
@@ -24,7 +42,6 @@ e_dbus_peer_get_machine_id(E_DBus_Connection*conn, const char *destination, cons
   e_dbus_message_send(conn, msg, cb_return, -1, data);
 }
 
-
 /**
  * Get the value of a property on an object
  *
-- 
1.5.4.3

>From a3664d5bed202896bada9390d2d31a4cd39ac3c9 Mon Sep 17 00:00:00 2001
Message-Id: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
From: Stefan Schmidt <[EMAIL PROTECTED]>
Date: Sat, 1 Mar 2008 01:26:31 +0100
Subject: [PATCH 2/5] Add dbus interfaces from the new NM API.

Add dbus interfaces from the new NM API and group the interfaces together. The
settings and VPN interfaces will get added when we really use them in e_nm.

---
 src/lib/nm/e_nm_private.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/nm/e_nm_private.h b/src/lib/nm/e_nm_private.h
index 9d5d5ab..5f40a28 100644
--- a/src/lib/nm/e_nm_private.h
+++ b/src/lib/nm/e_nm_private.h
@@ -2,10 +2,13 @@
 #define E_NM_PRIVATE_H
 
 #define E_NM_SERVICE "org.freedesktop.NetworkManager"
-#define E_NM_INTERFACE_NETWORK_MANAGER "org.freedesktop.NetworkManager"
 #define E_NM_PATH_NETWORK_MANAGER "/org/freedesktop/NetworkManager"
+#define E_NM_INTERFACE_NETWORK_MANAGER "org.freedesktop.NetworkManager"
+#define E_NM_INTERFACE_ACCESSPOINT "org.freedesktop.NetworkManager.AccessPoint"
 #define E_NM_INTERFACE_DEVICE "org.freedesktop.NetworkManager.Device"
-
+#define E_NM_INTERFACE_DEVICE_WIRELESS "org.freedesktop.NetworkManager.Device.Wireless"
+#define E_NM_INTERFACE_DEVICE_WIRED "org.freedesktop.NetworkManager.Device.Wired"
+#define E_NM_INTERFACE_IP4CONFIG "org.freedesktop.NetworkManager.IP4Config"
 
 #define e_nm_manager_call_new(member) dbus_message_new_method_call(E_NM_SERVICE, E_NM_PATH_NETWORK_MANAGER, E_NM_INTERFACE_NETWORK_MANAGER, member)
 
@@ -29,7 +32,6 @@ struct E_NM_Context
 };
 
 
-
 int e_nm_get_from_nm(E_NM_Context *ctx, E_DBus_Callback_Func cb_func, void *data,
                      const char *method, int rettype);
 int e_nm_get_from_device(E_NM_Context *ctx, const char *device,
-- 
1.5.4.3

>From 6c36736a780a31f99940c72f5820da95d246805c Mon Sep 17 00:00:00 2001
Message-Id: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
From: Stefan Schmidt <[EMAIL PROTECTED]>
Date: Sat, 1 Mar 2008 01:27:12 +0100
Subject: [PATCH 3/5] Make sure properties_interface gets unrefed.

Make sure properties_interface gets unrefed like the introspection_interface.

---
 src/lib/dbus/e_dbus_object.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/lib/dbus/e_dbus_object.c b/src/lib/dbus/e_dbus_object.c
index d79697a..ea2c926 100644
--- a/src/lib/dbus/e_dbus_object.c
+++ b/src/lib/dbus/e_dbus_object.c
@@ -172,7 +172,7 @@ e_dbus_object_init(void)
   {
     if (introspectable_interface) e_dbus_interface_unref(introspectable_interface);
     introspectable_interface = NULL;
-    if (properties_interface) e_dbus_interface_unref(introspectable_interface);
+    if (properties_interface) e_dbus_interface_unref(properties_interface);
     properties_interface = NULL;
     return 0;
   }
@@ -188,6 +188,9 @@ e_dbus_object_shutdown(void)
 {
   e_dbus_interface_unref(introspectable_interface);
   introspectable_interface = NULL;
+
+  e_dbus_interface_unref(properties_interface);
+  properties_interface = NULL;
 }
 
 /**
-- 
1.5.4.3

>From dd4cbee14f1d2b8a388f79d2165a5bde5e30ab29 Mon Sep 17 00:00:00 2001
Message-Id: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
From: Stefan Schmidt <[EMAIL PROTECTED]>
Date: Sat, 1 Mar 2008 01:27:41 +0100
Subject: [PATCH 4/5] Catchup with the renaming of the GetDevices method.

Catchup with the renaming of the GetDevices method.

---
 src/lib/nm/e_nm_manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/nm/e_nm_manager.c b/src/lib/nm/e_nm_manager.c
index e69ae86..265249e 100644
--- a/src/lib/nm/e_nm_manager.c
+++ b/src/lib/nm/e_nm_manager.c
@@ -18,7 +18,7 @@ e_nm_get_devices(E_NM_Context *ctx, E_DBus_Callback_Func cb_func, void *data)
   DBusMessage *msg;
   int ret;
 
-  msg = e_nm_manager_call_new("getDevices");
+  msg = e_nm_manager_call_new("GetDevices");
 
   ret = e_dbus_method_call_send(ctx->conn, msg, cb_nm_string_list, cb_func, free_nm_string_list, -1, data) ? 1 : 0;
   dbus_message_unref(msg);
-- 
1.5.4.3

>From 313b8329defd89a6f1c4636014fcc02128273b55 Mon Sep 17 00:00:00 2001
Message-Id: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
From: Stefan Schmidt <[EMAIL PROTECTED]>
Date: Sat, 1 Mar 2008 01:28:29 +0100
Subject: [PATCH 5/5] Introduce matching structs for the new "object" based DBus API.

Introduce matching structs for the new "object" based DBus API.

---
 src/lib/nm/E_Nm.h |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/src/lib/nm/E_Nm.h b/src/lib/nm/E_Nm.h
index e0300e5..9593c63 100644
--- a/src/lib/nm/E_Nm.h
+++ b/src/lib/nm/E_Nm.h
@@ -2,6 +2,7 @@
 #define E_HM_H
 
 #include <E_DBus.h>
+#include <Ecore_Data.h>
 
 #ifdef EAPI
 #undef EAPI
@@ -26,6 +27,77 @@
 
 typedef struct E_NM_Context E_NM_Context;
 
+/**
+ * Matching structs for the new "object" based DBus API
+ * VPN is missing as this was still missing the redesign for the new 0.7 API
+ */
+typedef struct E_NM_Device E_NM_Device;
+struct E_NM_Device
+{
+   char *udi; /* object_path */
+   char *interface;
+   char *driver;
+   uint capabilities;
+   int  ip4address;
+   uint state;
+   char *ip4config; /* object_path */
+   int  carrier;
+   uint type;
+};
+
+typedef struct E_NM_Device_Wireless E_NM_Device_Wireless;
+struct E_NM_Device_Wireless
+{
+   char *hwaddress;
+   int   mode;
+   uint bitrate;
+   char *activeaccesspoint; /* object_path */
+   uint wirelesscapabilities;
+};
+
+typedef struct E_NM_Device_Wired E_NM_Device_Wired;
+struct E_NM_Device_Wired
+{
+   char *hwaddress;
+   uint speed;
+};
+
+typedef struct E_NM_Access_Point E_NM_Access_Point;
+struct E_NM_Access_Point
+{
+   uint flags;
+   uint wpaflags;
+   uint rsnflags;
+   char *ssid;
+   uint frequency;
+   char *hwaddress;
+   int  mode;
+   uint rate;
+   uint strength;
+};
+
+typedef struct E_NM_IP4Config E_NM_IP4Config;
+struct E_NM_IP4Config
+{
+   uint address;
+   uint gateway;
+   uint netmask;
+   uint broadcast;
+   char *hostname;
+   Ecore_List *nameserver;  /* uints */
+   Ecore_List *domains; /* char* */
+   char *nisdomain;
+   Ecore_List *nisserver; /* uints */
+};
+
+typedef struct E_NM_Manager E_NM_Manager;
+struct E_NM_Manager
+{
+   int wirelessenabled; /* writeable*/
+   int wirelesshardwareenabled;
+   uint state;
+};
+
 typedef void (*E_NM_Cb_Manager_State_Change) (void *data, int state);
 typedef void (*E_NM_Cb_Manager_Device_Added) (void *data, const char *device);
 typedef void (*E_NM_Cb_Manager_Device_Removed) (void *data, const char *device);
-- 
1.5.4.3

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to