Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : apps/express

Dir     : e17/apps/express/src


Modified Files:
        Express.h Makefile.am exp_eb.c exp_main.c 
Added Files:
        exp_services.c exp_services.h 


Log Message:
- exp_services keeps track of the available services (icq, irc, msn, etc)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/express/src/Express.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- Express.h   13 Jan 2005 05:10:36 -0000      1.3
+++ Express.h   3 Feb 2005 04:44:52 -0000       1.4
@@ -124,6 +124,7 @@
   } changes;
 };
 
+#include "exp_services.h"
 
 int exp_gui_init(Exp *exp);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/express/src/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Makefile.am 13 Jan 2005 06:45:51 -0000      1.4
+++ Makefile.am 3 Feb 2005 04:44:52 -0000       1.5
@@ -14,6 +14,7 @@
                exp_buddy.c \
                exp_message.c \
                exp_conversation.c \
+               exp_services.c \
                exp_eb.c exp_eb.h
                
 express_LDADD = @edje_libs@ @ecore_libs@ @edb_libs@ @evas_libs@ \
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/express/src/exp_eb.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- exp_eb.c    13 Jan 2005 18:08:43 -0000      1.6
+++ exp_eb.c    3 Feb 2005 04:44:52 -0000       1.7
@@ -275,30 +275,51 @@
   {
     char *service_name, *theme_colour;
     int capabilities;
+    Exp_Service *service;
 
     service_name = cmds[1];
     theme_colour = cmds[2];
     capabilities = atoi(cmds[3]);
 
-    printf("name %s, colour %s, caps %d\n", service_name, theme_colour,
-        capabilities);
-
+    service = exp_service_find(service_name);
+    if (!service)
+    {
+        service = exp_service_new(service_name);
+    }
+    exp_service_colour_set(service, theme_colour);
+    exp_service_capabilities_set(service, capabilities);
   }
   else if (!strcmp(cmds[0], "list_service_done"))
   {
-
+    /* don't need to do anything */
   }
   else if (!strcmp(cmds[0], "list_service_actions"))
   {
+    int count;
+    count = atoi(cmds[3]);
 
+    /* don't know what these are, eb-lite gives a count of 0 all the time
+     * for them */
+    if (count > 0)
+      printf("%s %s %d\n", cmds[1], cmds[2], count);
   }
   else if (!strcmp(cmds[0], "list_service_states"))
   {
+    int count, i;
 
+    /* we probably need to store these to display to the use as states they
+     * can set the account into */
+    count = atoi(cmds[2]);
+    if (count > 0)
+    {
+      printf("%s %d\n", cmds[1], count);
+      for (i = 3; i < count + 3; i++)
+        printf("\t%s\n", cmds[i]);
+    }
   }
   else if (!strcmp(cmds[0], "list_services_done"))
   {
-
+    /* ignore it ... */
   }
 
   /* contact functions */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/express/src/exp_main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- exp_main.c  13 Jan 2005 18:11:17 -0000      1.5
+++ exp_main.c  3 Feb 2005 04:44:53 -0000       1.6
@@ -38,6 +38,12 @@
        return 1;
   }
 
+  if (!exp_services_init())
+  {
+    printf("Unable to setup services handler\n");
+    return 1;
+  }
+
   if (!exp_gui_init(exp))
   {
     printf("Unable to setup GUI subsystem\n");
@@ -55,6 +61,7 @@
 
   ecore_main_loop_begin();
 
+  exp_services_shutdown();
   exp_eb_shutdown();
   edje_shutdown();
   ecore_evas_shutdown();




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to