[E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-01 Thread Stefan Schmidt
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


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


Re: [E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-01 Thread Stefan Schmidt
Hello.

This is the first patch with some small fixes for e_nm and stuff I
found on my way working on it.

Nothing really nice yet, but I like to get the patchset down instead
of posting all at once and nobody like to review such a big set.

From my understanding e_nm was started, but not used in any
application yet. The overall structur is good, but sadly the NM dbus
API changed completely. Former they used function calls with parameter
and return values only. Now they use a lot properties on the
interfaces and added more interfaces. I would like to keep this easy
and just use structs filled with the given properties. See last patch.

The latest example code, e_dbus_nm, does not run at all with newer svn
version of NM 0.7 because of all the API changes. So I see two ways of
handle the transition:

1) I completely kick all non-working functions in one shot and start
from the still working stuff.

2) I replace non-working by working function for function.

Let me know your comments about code and ideas.

regards
Stefan Schmidt


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


Re: [E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-01 Thread Gustavo Sverzut Barbieri
On Sat, Mar 1, 2008 at 6:46 PM, Stefan Schmidt
<[EMAIL PROTECTED]> wrote:
> Hello.
>
>  This is the first patch with some small fixes for e_nm and stuff I
>  found on my way working on it.
>
>  Nothing really nice yet, but I like to get the patchset down instead
>  of posting all at once and nobody like to review such a big set.
>
>  From my understanding e_nm was started, but not used in any
>  application yet. The overall structur is good, but sadly the NM dbus
>  API changed completely. Former they used function calls with parameter
>  and return values only. Now they use a lot properties on the
>  interfaces and added more interfaces. I would like to keep this easy
>  and just use structs filled with the given properties. See last patch.
>
>  The latest example code, e_dbus_nm, does not run at all with newer svn
>  version of NM 0.7 because of all the API changes. So I see two ways of
>  handle the transition:
>
>  1) I completely kick all non-working functions in one shot and start
>  from the still working stuff.

This is the best option given the current user base and like. ;-)

I hope we can have some nice gadgets using nm to provide status and
quick access, maybe a simple but powerful "app" inside E to control
basics, like I did with my mixer [1,2] which have this "mixer app"
that is really just a dialog provided by the applet, so it's very
light, but useful.

And thanks for using git! Would be great to host your tree somewhere.

[1] http://staff.get-e.org/?p=users/barbieri/e_module-mixer.git
[2] http://staff.get-e.org/~barbieri/e17_mixer.png

-- 
Gustavo Sverzut Barbieri
--
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

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


Re: [E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-01 Thread Stefan Schmidt
Hello.

On Sat, 2008-03-01 at 19:14, Gustavo Sverzut Barbieri wrote:
> On Sat, Mar 1, 2008 at 6:46 PM, Stefan Schmidt
> <[EMAIL PROTECTED]> wrote:
> >
> >  1) I completely kick all non-working functions in one shot and start
> >  from the still working stuff.
> 
> This is the best option given the current user base and like. ;-)

OK. If nobody else have objections I'll take this route. Of course I
still will take care that everything builds fine.

> I hope we can have some nice gadgets using nm to provide status and
> quick access, maybe a simple but powerful "app" inside E to control
> basics, like I did with my mixer [1,2] which have this "mixer app"
> that is really just a dialog provided by the applet, so it's very
> light, but useful.

My plan is to write a e_module with the basics for connecting to
wireless and wired networks based on the things I learned while
writing the OpenMoko code. The former will also be FOSS, but need a
second iteration for having it generic enough for E.

That also does not depend on OpenMoko as I missing NM support is the
last thing that keeps E away from my notebook. :)

> And thanks for using git! Would be great to host your tree somewhere.

I send you my ssh-key in private. Having a tree on staff.get-e.org as
mirror of my local staging ground for patches would be good.

regards
Stefan Schmidt

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


Re: [E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-04 Thread The Rasterman
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?
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 :)

> Hello.
> 
> This is the first patch with some small fixes for e_nm and stuff I
> found on my way working on it.
> 
> Nothing really nice yet, but I like to get the patchset down instead
> of posting all at once and nobody like to review such a big set.
> 
> From my understanding e_nm was started, but not used in any
> application yet. The overall structur is good, but sadly the NM dbus
> API changed completely. Former they used function calls with parameter
> and return values only. Now they use a lot properties on the
> interfaces and added more interfaces. I would like to keep this easy
> and just use structs filled with the given properties. See last patch.
> 
> The latest example code, e_dbus_nm, does not run at all with newer svn
> version of NM 0.7 because of all the API changes. So I see two ways of
> handle the transition:
> 
> 1) I completely kick all non-working functions in one shot and start
> from the still working stuff.
> 
> 2) I replace non-working by working function for function.
> 
> Let me know your comments about code and ideas.
> 
> regards
> Stefan Schmidt
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]


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


Re: [E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-05 Thread Stefan Schmidt
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_i

Re: [E-devel] [PATCH 1/5] Add comments for dbus peer functions.

2008-03-09 Thread The Rasterman
On Wed, 5 Mar 2008 14:13:03 +0100 Stefan Schmidt <[EMAIL PROTECTED]>
babbled:

in cvws they go! thanks mucho! :)

> 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
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]


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