On Sat, 19 Dec 2009, Enlightenment SVN wrote:

>    fprintf(stderr, "set_property %s [%p] %s %c %p...\n",
>          args, element, name, type, value);
> -   e_connman_element_property_set(element, name, type, value);
> +   if (!e_connman_element_property_set(element, name, type, value))
> +     {
> +     fputs("ERROR: error setting property.\n", stderr);

why using fputs and not eina_log ?

Vincent


> +     return 1;
> +     }
>    return 1;
> }
>
> @@ -294,6 +298,22 @@
> }
>
> static int
> +_on_cmd_manager_get_services(char *cmd, char *args)
> +{
> +   unsigned int count;
> +   E_Connman_Element **services;
> +
> +   if (!e_connman_manager_services_get(&count, &services))
> +     {
> +     fputs("ERROR: can't get services\n", stderr);
> +     return 1;
> +     }
> +   printf("BEG: all manager services elements count = %d\n", count);
> +   _elements_print(services, count);
> +   return 1;
> +}
> +
> +static int
> _on_cmd_manager_register_agent(char *cmd, char *args)
> {
>    char *path;
> @@ -836,6 +856,86 @@
>    return 1;
> }
>
> +static int
> +_on_cmd_profile_get_offline_mode(char *cmd, char *args)
> +{
> +   char *path;
> +   bool offline;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the profile path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_profile_get(path);
> +   if (e_connman_profile_offline_mode_get(e, &offline))
> +     printf(":::Profile  %s Offline Mode = %hhu\n", path, offline);
> +   else
> +     fputs("ERROR: can't get profile offline mode\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_profile_set_offline_mode(char *cmd, char *args)
> +{
> +   char *path, *next_args;
> +   bool offline;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the profile path\n", stderr);
> +     return 1;
> +     }
> +   path = args;
> +   next_args = _tok(args);
> +   if (!next_args)
> +     {
> +     fputs("ERROR: missing the offline mode value\n", stderr);
> +     return 1;
> +     }
> +   _tok(next_args);
> +   offline = !!atol(next_args);
> +
> +   e = e_connman_profile_get(path);
> +   if (e_connman_profile_offline_mode_set(e, offline, NULL, NULL))
> +     printf(":::Profile %s Offline Mode set to %hhu\n", path, offline);
> +   else
> +     fputs("ERROR: can't set profile offline mode\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_profile_get_services(char *cmd, char *args)
> +{
> +   E_Connman_Element **services;
> +   E_Connman_Element *e;
> +   unsigned int count;
> +   char *path;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the profile path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_profile_get(path);
> +   if (!e_connman_profile_services_get(e, &count, &services))
> +     {
> +     fputs("ERROR: can't get services\n", stderr);
> +     return 1;
> +     }
> +   printf("BEG: all profile services count = %d\n", count);
> +   _elements_print(services, count);
> +   return 1;
> +}
> +
> /* Connection Commands */
>
> static int
> @@ -1411,8 +1511,683 @@
>    return 1;
> }
>
> +/* Services Commands */
>
> static int
> +_on_cmd_service_connect(char *cmd, char *args)
> +{
> +   char *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_connect(e, NULL, NULL))
> +     printf(":::Connecting to Service %s...\n", path);
> +   else
> +     fputs("ERROR: can't connect to service\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_disconnect(char *cmd, char *args)
> +{
> +   char *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_disconnect(e, NULL, NULL))
> +     printf(":::Disconnecting Service %s...\n", path);
> +   else
> +     fputs("ERROR: can't disconnect service\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_remove(char *cmd, char *args)
> +{
> +   char *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_remove(e, NULL, NULL))
> +     printf(":::Removing Service %s...\n", path);
> +   else
> +     fputs("ERROR: can't remove service\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_move_before(char *cmd, char *args)
> +{
> +   char *path, *service_path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   service_path = args;
> +   path = _tok(args);
> +
> +   if (!path)
> +     {
> +     fputs("ERROR: missing the object service\n", stderr);
> +     return 1;
> +     }
> +   _tok(path);
> +
> +   e = e_connman_service_get(service_path);
> +   if (e_connman_service_move_before(e, path, NULL, NULL))
> +     printf(":::Moving before %s...\n", path);
> +   else
> +     fputs("ERROR: can't move before\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_move_after(char *cmd, char *args)
> +{
> +   char *path, *service_path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   service_path = args;
> +   path = _tok(args);
> +
> +   if (!path)
> +     {
> +     fputs("ERROR: missing the object service\n", stderr);
> +     return 1;
> +     }
> +   _tok(path);
> +
> +   e = e_connman_service_get(service_path);
> +   if (e_connman_service_move_after(e, path, NULL, NULL))
> +     printf(":::Moving after %s...\n", path);
> +   else
> +     fputs("ERROR: can't move after\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_state(char *cmd, char *args)
> +{
> +   const char *state, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_state_get(e, &state))
> +     printf(":::Service %s State = \"%s\"\n", path, state);
> +   else
> +     fputs("ERROR: can't get service state\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_error(char *cmd, char *args)
> +{
> +   const char *error, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_error_get(e, &error))
> +     printf(":::Service %s Error = \"%s\"\n", path, error);
> +   else
> +     fputs("ERROR: can't get service error\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_name(char *cmd, char *args)
> +{
> +   const char *name, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_name_get(e, &name))
> +     printf(":::Service %s Name = \"%s\"\n", path, name);
> +   else
> +     fputs("ERROR: can't get service name\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_type(char *cmd, char *args)
> +{
> +   const char *type, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_type_get(e, &type))
> +     printf(":::Service %s Type = \"%s\"\n", path, type);
> +   else
> +     fputs("ERROR: can't get service type\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_mode(char *cmd, char *args)
> +{
> +   const char *mode, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_mode_get(e, &mode))
> +     printf(":::Service %s Mode = \"%s\"\n", path, mode);
> +   else
> +     fputs("ERROR: can't get service mode\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_security(char *cmd, char *args)
> +{
> +   const char *security, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_security_get(e, &security))
> +     printf(":::Service %s Security = \"%s\"\n", path, security);
> +   else
> +     fputs("ERROR: can't get service security\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_passphrase(char *cmd, char *args)
> +{
> +   const char *passphrase, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_passphrase_get(e, &passphrase))
> +     printf(":::Service %s Passphrase = \"%s\"\n", path, passphrase);
> +   else
> +     fputs("ERROR: can't get service passphrase\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_set_passphrase(char *cmd, char *args)
> +{
> +   char *passphrase, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   path = args;
> +   passphrase = _tok(args);
> +
> +   if (!passphrase)
> +     {
> +     fputs("ERROR: missing the passphrase value\n", stderr);
> +     return 1;
> +     }
> +   _tok(passphrase);
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_passphrase_set(e, passphrase, NULL, NULL))
> +     printf(":::Service %s passphrase set to \"%s\"\n", path, passphrase);
> +   else
> +     fputs("ERROR: can't set service passphrase\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_passphrase_required(char *cmd, char *args)
> +{
> +   const char *path;
> +   bool passphrase;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_passphrase_required_get(e, &passphrase))
> +     printf(":::Service %s Passphrase Required = %hhu\n", path, passphrase);
> +   else
> +     fputs("ERROR: can't get service passphrase required\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_strength(char *cmd, char *args)
> +{
> +   const char *path;
> +   unsigned char strength;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_strength_get(e, &strength))
> +     printf(":::Service %s Strength = %#02hhx (%d)\n", path, strength, 
> strength);
> +   else
> +     fputs("ERROR: can't get service strength\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_favorite(char *cmd, char *args)
> +{
> +   const char *path;
> +   bool favorite;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_favorite_get(e, &favorite))
> +     printf(":::Service %s Favorite = %hhu\n", path, favorite);
> +   else
> +     fputs("ERROR: can't get service favorite\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_auto_connect(char *cmd, char *args)
> +{
> +   const char *path;
> +   bool auto_connect;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_auto_connect_get(e, &auto_connect))
> +     printf(":::Service %s Auto Connect = %hhu\n", path, auto_connect);
> +   else
> +     fputs("ERROR: can't get service auto connect\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_set_auto_connect(char *cmd, char *args)
> +{
> +   char *path, *next_args;
> +   bool auto_connect;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   path = args;
> +   next_args = _tok(args);
> +
> +   if (!next_args)
> +     {
> +     fputs("ERROR: missing the auto connect value\n", stderr);
> +     return 1;
> +     }
> +   _tok(next_args);
> +   auto_connect = !!atol(next_args);
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_auto_connect_set(e, auto_connect, NULL, NULL))
> +     printf(":::Service %s auto connect set to %d\n", path, auto_connect);
> +   else
> +     fputs("ERROR: can't set service auto connect\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_setup_required(char *cmd, char *args)
> +{
> +   const char *path;
> +   bool setup_required;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_setup_required_get(e, &setup_required))
> +     printf(":::Service %s Setup Required = %hhu\n", path, setup_required);
> +   else
> +     fputs("ERROR: can't get service setup required\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_apn(char *cmd, char *args)
> +{
> +   const char *apn, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_apn_get(e, &apn))
> +     printf(":::Service %s APN = \"%s\"\n", path, apn);
> +   else
> +     fputs("ERROR: can't get service APN\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_set_apn(char *cmd, char *args)
> +{
> +   char *apn, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   path = args;
> +   apn = _tok(args);
> +
> +   if (!apn)
> +     {
> +     fputs("ERROR: missing the apn value\n", stderr);
> +     return 1;
> +     }
> +   _tok(apn);
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_apn_set(e, apn, NULL, NULL))
> +     printf(":::Service %s APN set to \"%s\"\n", path, apn);
> +   else
> +     fputs("ERROR: can't set service APN\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_mcc(char *cmd, char *args)
> +{
> +   const char *mcc, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_mcc_get(e, &mcc))
> +     printf(":::Service %s MCC = \"%s\"\n", path, mcc);
> +   else
> +     fputs("ERROR: can't get service MCC\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_mnc(char *cmd, char *args)
> +{
> +   const char *mnc, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_mnc_get(e, &mnc))
> +     printf(":::Service %s MNC = \"%s\"\n", path, mnc);
> +   else
> +     fputs("ERROR: can't get service MNC\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_roaming(char *cmd, char *args)
> +{
> +   const char *path;
> +   bool roaming;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_roaming_get(e, &roaming))
> +     printf(":::Service %s Roaming = %hhu\n", path, roaming);
> +   else
> +     fputs("ERROR: can't get service roaming\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_ipv4_method(char *cmd, char *args)
> +{
> +   const char *ipv4_method, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_ipv4_method_get(e, &ipv4_method))
> +     printf(":::Service %s ipv4 method = \"%s\"\n", path, ipv4_method);
> +   else
> +     fputs("ERROR: can't get service ipv4 method\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_set_ipv4_method(char *cmd, char *args)
> +{
> +   char *ipv4_method, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   path = args;
> +   ipv4_method = _tok(args);
> +
> +   if (!ipv4_method)
> +     {
> +     fputs("ERROR: missing the ipv4 method value\n", stderr);
> +     return 1;
> +     }
> +   _tok(ipv4_method);
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_ipv4_method_set(e, ipv4_method, NULL, NULL))
> +     printf(":::Service %s set to ipv4 method\"%s\"\n", path, ipv4_method);
> +   else
> +     fputs("ERROR: can't set service ipv4 method\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_get_ipv4_address(char *cmd, char *args)
> +{
> +   const char *ipv4_address, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   _tok(args);
> +   path = args;
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_ipv4_address_get(e, &ipv4_address))
> +     printf(":::Service %s ipv4 address = \"%s\"\n", path, ipv4_address);
> +   else
> +     fputs("ERROR: can't get service ipv4 address\n", stderr);
> +   return 1;
> +}
> +
> +static int
> +_on_cmd_service_set_ipv4_address(char *cmd, char *args)
> +{
> +   char *ipv4_address, *path;
> +   E_Connman_Element *e;
> +
> +   if (!args)
> +     {
> +     fputs("ERROR: missing the service path\n", stderr);
> +     return 1;
> +     }
> +   path = args;
> +   ipv4_address= _tok(args);
> +
> +   if (!ipv4_address)
> +     {
> +     fputs("ERROR: missing the ipv4 address value\n", stderr);
> +     return 1;
> +     }
> +   _tok(ipv4_address);
> +
> +   e = e_connman_service_get(path);
> +   if (e_connman_service_ipv4_address_set(e, ipv4_address, NULL, NULL))
> +     printf(":::Service %s ipv4 address set to \"%s\"\n", path, 
> ipv4_address);
> +   else
> +     fputs("ERROR: can't set service ipv4 address\n", stderr);
> +   return 1;
> +}
> +
> +
> +static int
> _on_input(void *data, Ecore_Fd_Handler *fd_handler)
> {
>    char buf[256];
> @@ -1431,6 +2206,7 @@
>      {"manager_get_profiles", _on_cmd_manager_get_profiles},
>      {"manager_get_devices", _on_cmd_manager_get_devices},
>      {"manager_get_connections", _on_cmd_manager_get_connections},
> +     {"manager_get_services", _on_cmd_manager_get_services},
>      {"manager_register_agent", _on_cmd_manager_register_agent},
>      {"manager_unregister_agent", _on_cmd_manager_unregister_agent},
>      {"manager_get_state", _on_cmd_manager_get_state},
> @@ -1455,6 +2231,9 @@
>      {"device_get_scanning", _on_cmd_device_get_scanning},
>      {"device_get_networks", _on_cmd_device_get_networks},
>      {"profile_get_name", _on_cmd_profile_get_name},
> +     {"profile_get_offline_mode", _on_cmd_profile_get_offline_mode},
> +     {"profile_set_offline_mode", _on_cmd_profile_set_offline_mode},
> +     {"profile_get_services", _on_cmd_profile_get_services},
>      {"connection_get_type", _on_cmd_connection_get_type},
>      {"connection_get_interface", _on_cmd_connection_get_interface},
>      {"connection_get_strength", _on_cmd_connection_get_strength},
> @@ -1479,9 +2258,38 @@
>      {"network_set_wifi_security", _on_cmd_network_set_wifi_security},
>      {"network_get_wifi_passphrase", _on_cmd_network_get_wifi_passphrase},
>      {"network_set_wifi_passphrase", _on_cmd_network_set_wifi_passphrase},
> +     {"service_connect", _on_cmd_service_connect},
> +     {"service_disconnect", _on_cmd_service_disconnect},
> +     {"service_remove", _on_cmd_service_remove},
> +     {"service_move_before", _on_cmd_service_move_before},
> +     {"service_move_after", _on_cmd_service_move_after},
> +     {"service_get_state", _on_cmd_service_get_state},
> +     {"service_get_error", _on_cmd_service_get_error},
> +     {"service_get_name", _on_cmd_service_get_name},
> +     {"service_get_type", _on_cmd_service_get_type},
> +     {"service_get_mode", _on_cmd_service_get_mode},
> +     {"service_get_security", _on_cmd_service_get_security},
> +     {"service_get_passphrase", _on_cmd_service_get_passphrase},
> +     {"service_set_passphrase", _on_cmd_service_set_passphrase},
> +     {"service_get_passphrase_required", 
> _on_cmd_service_get_passphrase_required},
> +     {"service_get_strength", _on_cmd_service_get_strength},
> +     {"service_get_favorite", _on_cmd_service_get_favorite},
> +     {"service_get_auto_connect", _on_cmd_service_get_auto_connect},
> +     {"service_set_auto_connect", _on_cmd_service_set_auto_connect},
> +     {"service_get_setup_required", _on_cmd_service_get_setup_required},
> +     {"service_get_apn", _on_cmd_service_get_apn},
> +     {"service_set_apn", _on_cmd_service_set_apn},
> +     {"service_get_mcc", _on_cmd_service_get_mcc},
> +     {"service_get_mnc", _on_cmd_service_get_mnc},
> +     {"service_get_roaming", _on_cmd_service_get_roaming},
> +     {"service_get_ipv4_method", _on_cmd_service_get_ipv4_method},
> +     {"service_set_ipv4_method", _on_cmd_service_set_ipv4_method},
> +     {"service_get_ipv4_address", _on_cmd_service_get_ipv4_address},
> +     {"service_set_ipv4_address", _on_cmd_service_set_ipv4_address},
>      {NULL, NULL}
>    };
>
> +
>    if (ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_ERROR))
>      {
>       fputs("ERROR: reading from stdin, exit\n", stderr);
>
> Modified: trunk/e_dbus/src/bin/e_dbus_connman_test_api.c
> ===================================================================
> --- trunk/e_dbus/src/bin/e_dbus_connman_test_api.c    2009-12-19 21:05:49 UTC 
> (rev 44580)
> +++ trunk/e_dbus/src/bin/e_dbus_connman_test_api.c    2009-12-19 22:18:02 UTC 
> (rev 44581)
> @@ -2,10 +2,10 @@
> #include <stdio.h>
> #include <string.h>
>
> -#define DBG(...) EINA_ERROR_PDBG(__VA_ARGS__)
> -#define INF(...) EINA_ERROR_PINFO(__VA_ARGS__)
> -#define WRN(...) EINA_ERROR_PWARN(__VA_ARGS__)
> -#define ERR(...) EINA_ERROR_PERR(__VA_ARGS__)
> +#define DBG(...) EINA_LOG_DBG(__VA_ARGS__)
> +#define INF(...) EINA_LOG_INFO(__VA_ARGS__)
> +#define WRN(...) EINA_LOG_WARN(__VA_ARGS__)
> +#define ERR(...) EINA_LOG_ERR(__VA_ARGS__)
>
> static int success = 0;
> static int failure = 0;
> @@ -341,6 +341,7 @@
>   TEST_DESC_ELEMENTS_GET_GLOBAL(e_connman_manager_profiles_get, 0),
>   TEST_DESC_ELEMENTS_GET_GLOBAL(e_connman_manager_devices_get, 0),
>   TEST_DESC_ELEMENTS_GET_GLOBAL(e_connman_manager_connections_get, 1),
> +  TEST_DESC_ELEMENTS_GET_GLOBAL(e_connman_manager_services_get, 1),
>   TEST_DESC_SENTINEL
> };
>
> @@ -363,6 +364,9 @@
>
> static const struct test_desc test_desc_profile[] = {
>   TEST_DESC_STRING_GET(e_connman_profile_name_get, 0),
> +  TEST_DESC_BOOL_GET(e_connman_profile_offline_mode_get, 0),
> +  //TEST_DESC_BOOL_SET(e_connman_profile_offline_mode_set, 0),
> +  TEST_DESC_ELEMENTS_GET(e_connman_profile_services_get, 1),
>   TEST_DESC_SENTINEL
> };
>
> @@ -396,6 +400,34 @@
>   TEST_DESC_SENTINEL
> };
>
> +static const struct test_desc test_desc_service[] = {
> +  /* TODO: need to check exactly what properties may fail */
> +  TEST_DESC_STRING_GET(e_connman_service_state_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_error_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_name_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_type_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_mode_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_security_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_passphrase_get, 1),
> +  //TEST_DESC_STRING_SET(e_connman_service_passphrase_set, 1),
> +  TEST_DESC_BOOL_GET(e_connman_service_passphrase_required_get, 1),
> +  TEST_DESC_UCHAR_GET(e_connman_service_strength_get, 1),
> +  TEST_DESC_BOOL_GET(e_connman_service_favorite_get, 1),
> +  TEST_DESC_BOOL_GET(e_connman_service_auto_connect_get, 1),
> +  //TEST_DESC_BOOL_SET(e_connman_service_auto_connect_set, 1),
> +  TEST_DESC_BOOL_GET(e_connman_service_setup_required_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_apn_get, 1),
> +  //TEST_DESC_STRING_SET(e_connman_service_apn_set, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_mcc_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_mnc_get, 1),
> +  TEST_DESC_BOOL_GET(e_connman_service_roaming_get, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_ipv4_method_get, 1),
> +  //TEST_DESC_STRING_SET(e_connman_service_ipv4_method_set, 1),
> +  TEST_DESC_STRING_GET(e_connman_service_ipv4_address_get, 1),
> +  //TEST_DESC_STRING_SET(e_connman_service_ipv4_address_set, 1),
> +  TEST_DESC_SENTINEL
> +};
> +
> static int
> _quit(void *data)
> {
> @@ -442,6 +474,8 @@
>      _test_element(element, test_desc_network);
>    else if (e_connman_element_is_manager(element))
>      _test_element(element, test_desc_manager);
> +   else if (e_connman_element_is_service(element))
> +     _test_element(element, test_desc_service);
>    else
>      ERR("!!! don't know how to test %s [%s]\n",
>        element->path, element->interface);
>
> Modified: trunk/e_dbus/src/lib/connman/E_Connman.h
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/E_Connman.h  2009-12-19 21:05:49 UTC (rev 
> 44580)
> +++ trunk/e_dbus/src/lib/connman/E_Connman.h  2009-12-19 22:18:02 UTC (rev 
> 44581)
> @@ -61,6 +61,11 @@
>       Eina_Inlist *agent_register;
>       Eina_Inlist *agent_unregister;
>       Eina_Inlist *device_propose_scan;
> +     Eina_Inlist *service_connect;
> +     Eina_Inlist *service_disconnect;
> +     Eina_Inlist *service_remove;
> +     Eina_Inlist *service_move_before;
> +     Eina_Inlist *service_move_after;
>      } _pending;
>      struct {
>       Ecore_Idler *changed;
> @@ -125,12 +130,12 @@
>   EAPI bool e_connman_manager_profiles_get(unsigned int *count, 
> E_Connman_Element ***p_elements);
>   EAPI bool e_connman_manager_devices_get(unsigned int *count, 
> E_Connman_Element ***p_elements);
>   EAPI bool e_connman_manager_connections_get(unsigned int *count, 
> E_Connman_Element ***p_elements);
> +  EAPI bool e_connman_manager_services_get(unsigned int *count, 
> E_Connman_Element ***p_elements);
>
>   // TODO: profile_add (not implemented in connman right now)
>   // TODO: profile_remove (not implemented in connman right now)
>   // TODO: profile_active_get (not implemented in connman right now)
>   // TODO: profile_active_set (not implemented in connman right now)
> -  // TODO: services_get (not implemented in connman right now)
>
>
>   /* Device Methods */
> @@ -172,8 +177,11 @@
>   EAPI E_Connman_Element *e_connman_profile_get(const char *path) 
> EINA_ARG_NONNULL(1) EINA_PURE EINA_WARN_UNUSED_RESULT;
>   EAPI bool e_connman_profile_name_get(const E_Connman_Element *profile, 
> const char **name) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
>
> -  // TODO: services_get (not implemented in connman right now)
> +  EAPI bool e_connman_profile_offline_mode_get(const E_Connman_Element 
> *profile, bool *offline) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_profile_offline_mode_set(E_Connman_Element *profile, 
> bool offline, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
>
> +  EAPI bool e_connman_profile_services_get(const E_Connman_Element *profile, 
> unsigned int *count, E_Connman_Element ***p_elements) EINA_ARG_NONNULL(1, 2, 
> 3) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
>   /* Connection Methods */
>
>   EAPI E_Connman_Element *e_connman_connection_get(const char *path) 
> EINA_ARG_NONNULL(1) EINA_PURE EINA_WARN_UNUSED_RESULT;
> @@ -228,6 +236,61 @@
>
>   // TODO: address_get
>
> +  /* Services Methods */
> +
> +  EAPI E_Connman_Element *e_connman_service_get(const char *path) 
> EINA_ARG_NONNULL(1) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_connect(E_Connman_Element *service, 
> E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) 
> EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_disconnect(E_Connman_Element *service, 
> E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) 
> EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_remove(E_Connman_Element *service, 
> E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) 
> EINA_WARN_UNUSED_RESULT;
> +
> +  // TODO: clear_property
> +
> +  EAPI bool e_connman_service_move_before(E_Connman_Element *service, const 
> char *object_path, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_move_after(E_Connman_Element *service, const 
> char *object_path, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_state_get(const E_Connman_Element *service, 
> const char **state) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_error_get(const E_Connman_Element *service, 
> const char **error) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_name_get(const E_Connman_Element *service, 
> const char **name) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_type_get(const E_Connman_Element *service, 
> const char **type) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_mode_get(const E_Connman_Element *service, 
> const char **mode) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_security_get(const E_Connman_Element *service, 
> const char **security) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_passphrase_get(const E_Connman_Element 
> *service, const char **passphrase) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_passphrase_set(E_Connman_Element *service, 
> const char *passphrase, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_passphrase_required_get(const 
> E_Connman_Element *service, bool *passphrase_required) EINA_ARG_NONNULL(1, 2) 
> EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_strength_get(const E_Connman_Element *service, 
> unsigned char *strength) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_favorite_get(const E_Connman_Element *service, 
> bool *favorite) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_auto_connect_get(const E_Connman_Element 
> *service, bool *auto_connect) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_auto_connect_set(E_Connman_Element *service, 
> bool auto_connect, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_setup_required_get(const E_Connman_Element 
> *service, bool *setup_required) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_apn_get(const E_Connman_Element *service, 
> const char **apn) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_apn_set(E_Connman_Element *service, const char 
> *apn, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) 
> EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_mcc_get(const E_Connman_Element *service, 
> const char **mcc) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_mnc_get(const E_Connman_Element *service, 
> const char **mnc) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_roaming_get(const E_Connman_Element *service, 
> bool *roaming) EINA_ARG_NONNULL(1, 2) EINA_PURE EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_ipv4_method_get(const E_Connman_Element 
> *service, const char **method) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_ipv4_method_set(E_Connman_Element *service, 
> const char *method, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
> +
> +  EAPI bool e_connman_service_ipv4_address_get(const E_Connman_Element 
> *service, const char **address) EINA_ARG_NONNULL(1, 2) EINA_PURE 
> EINA_WARN_UNUSED_RESULT;
> +  EAPI bool e_connman_service_ipv4_address_set(E_Connman_Element *service, 
> const char *address, E_DBus_Method_Return_Cb cb, const void *data) 
> EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
> +
> #ifdef __cplusplus
> }
> #endif
>
> Modified: trunk/e_dbus/src/lib/connman/Makefile.am
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/Makefile.am  2009-12-19 21:05:49 UTC (rev 
> 44580)
> +++ trunk/e_dbus/src/lib/connman/Makefile.am  2009-12-19 22:18:02 UTC (rev 
> 44581)
> @@ -18,7 +18,8 @@
> e_connman_element.c \
> e_connman_manager.c \
> e_connman_network.c \
> -e_connman_profile.c
> +e_connman_profile.c \
> +e_connman_service.c
>
> libeconnman_la_LIBADD = \
> @EDBUS_LIBS@ @EVAS_LIBS@ \
>
> Modified: trunk/e_dbus/src/lib/connman/e_connman.c
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/e_connman.c  2009-12-19 21:05:49 UTC (rev 
> 44580)
> +++ trunk/e_dbus/src/lib/connman/e_connman.c  2009-12-19 22:18:02 UTC (rev 
> 44581)
> @@ -44,6 +44,7 @@
> const char *e_connman_prop_powered = NULL;
> const char *e_connman_prop_priority = NULL;
> const char *e_connman_prop_profiles = NULL;
> +const char *e_connman_prop_services = NULL;
> const char *e_connman_prop_remember = NULL;
> const char *e_connman_prop_scan_interval = NULL;
> const char *e_connman_prop_scanning = NULL;
> @@ -54,7 +55,20 @@
> const char *e_connman_prop_wifi_passphrase = NULL;
> const char *e_connman_prop_wifi_security = NULL;
> const char *e_connman_prop_wifi_ssid = NULL;
> +const char *e_connman_prop_error = NULL;
> +const char *e_connman_prop_mode = NULL;
> +const char *e_connman_prop_security = NULL;
> +const char *e_connman_prop_passphrase = NULL;
> +const char *e_connman_prop_passphrase_required = NULL;
> +const char *e_connman_prop_favorite = NULL;
> +const char *e_connman_prop_auto_connect = NULL;
> +const char *e_connman_prop_setup_required = NULL;
> +const char *e_connman_prop_apn = NULL;
> +const char *e_connman_prop_mcc = NULL;
> +const char *e_connman_prop_mnc = NULL;
> +const char *e_connman_prop_roaming = NULL;
>
> +
> int _e_dbus_connman_log_dom = -1;
>
> const char *
> @@ -289,6 +303,8 @@
>      e_connman_prop_priority = eina_stringshare_add("Priority");
>    if (e_connman_prop_profiles == NULL)
>      e_connman_prop_profiles = eina_stringshare_add("Profiles");
> +   if (e_connman_prop_services == NULL)
> +     e_connman_prop_services = eina_stringshare_add("Services");
>    if (e_connman_prop_remember == NULL)
>      e_connman_prop_remember = eina_stringshare_add("Remember");
>    if (e_connman_prop_scan_interval == NULL)
> @@ -309,6 +325,30 @@
>      e_connman_prop_wifi_security = eina_stringshare_add("WiFi.Security");
>    if (e_connman_prop_wifi_ssid == NULL)
>      e_connman_prop_wifi_ssid = eina_stringshare_add("WiFi.SSID");
> +   if (e_connman_prop_error == NULL)
> +     e_connman_prop_error = eina_stringshare_add("Error");
> +   if (e_connman_prop_mode == NULL)
> +     e_connman_prop_mode = eina_stringshare_add("Mode");
> +   if (e_connman_prop_security == NULL)
> +     e_connman_prop_security = eina_stringshare_add("Security");
> +   if (e_connman_prop_passphrase == NULL)
> +     e_connman_prop_passphrase = eina_stringshare_add("Passphrase");
> +   if (e_connman_prop_passphrase_required == NULL)
> +     e_connman_prop_passphrase_required = 
> eina_stringshare_add("PassphraseRequired");
> +   if (e_connman_prop_favorite == NULL)
> +     e_connman_prop_favorite = eina_stringshare_add("Favorite");
> +   if (e_connman_prop_auto_connect == NULL)
> +     e_connman_prop_auto_connect = eina_stringshare_add("AutoConnect");
> +   if (e_connman_prop_setup_required == NULL)
> +     e_connman_prop_setup_required = eina_stringshare_add("SetupRequired");
> +   if (e_connman_prop_apn == NULL)
> +     e_connman_prop_apn = eina_stringshare_add("APN");
> +   if (e_connman_prop_mcc == NULL)
> +     e_connman_prop_mcc = eina_stringshare_add("MCC");
> +   if (e_connman_prop_mnc == NULL)
> +     e_connman_prop_mnc = eina_stringshare_add("MCN");
> +   if (e_connman_prop_roaming == NULL)
> +     e_connman_prop_roaming = eina_stringshare_add("Roaming");
>
>    e_connman_conn = edbus_conn;
>    cb_name_owner_changed = e_dbus_signal_handler_add
> @@ -377,6 +417,7 @@
>    _stringshare_del(&e_connman_prop_powered);
>    _stringshare_del(&e_connman_prop_priority);
>    _stringshare_del(&e_connman_prop_profiles);
> +   _stringshare_del(&e_connman_prop_services);
>    _stringshare_del(&e_connman_prop_remember);
>    _stringshare_del(&e_connman_prop_scan_interval);
>    _stringshare_del(&e_connman_prop_scanning);
> @@ -387,6 +428,18 @@
>    _stringshare_del(&e_connman_prop_wifi_passphrase);
>    _stringshare_del(&e_connman_prop_wifi_security);
>    _stringshare_del(&e_connman_prop_wifi_ssid);
> +   _stringshare_del(&e_connman_prop_error);
> +   _stringshare_del(&e_connman_prop_mode);
> +   _stringshare_del(&e_connman_prop_security);
> +   _stringshare_del(&e_connman_prop_passphrase);
> +   _stringshare_del(&e_connman_prop_passphrase_required);
> +   _stringshare_del(&e_connman_prop_favorite);
> +   _stringshare_del(&e_connman_prop_auto_connect);
> +   _stringshare_del(&e_connman_prop_setup_required);
> +   _stringshare_del(&e_connman_prop_apn);
> +   _stringshare_del(&e_connman_prop_mcc);
> +   _stringshare_del(&e_connman_prop_mnc);
> +   _stringshare_del(&e_connman_prop_roaming);
>
>    if (pending_get_name_owner)
>      {
>
> Modified: trunk/e_dbus/src/lib/connman/e_connman_element.c
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/e_connman_element.c  2009-12-19 21:05:49 UTC 
> (rev 44580)
> +++ trunk/e_dbus/src/lib/connman/e_connman_element.c  2009-12-19 22:18:02 UTC 
> (rev 44581)
> @@ -300,6 +300,10 @@
>        if (strcmp(tail, "onnections") == 0)
>          interface = e_connman_iface_connection;
>        break;
> +      case 'S':
> +      if (strcmp(tail, "ervices") == 0)
> +        interface = e_connman_iface_service;
> +      break;
>       default:
>        break;
>      }
> @@ -699,6 +703,11 @@
>    
> e_connman_element_pending_cancel_and_free(&element->_pending.agent_register);
>    
> e_connman_element_pending_cancel_and_free(&element->_pending.agent_unregister);
>    
> e_connman_element_pending_cancel_and_free(&element->_pending.device_propose_scan);
> +   
> e_connman_element_pending_cancel_and_free(&element->_pending.service_connect);
> +   
> e_connman_element_pending_cancel_and_free(&element->_pending.service_disconnect);
> +   
> e_connman_element_pending_cancel_and_free(&element->_pending.service_remove);
> +   
> e_connman_element_pending_cancel_and_free(&element->_pending.service_move_before);
> +   
> e_connman_element_pending_cancel_and_free(&element->_pending.service_move_after);
>
>    e_connman_element_extra_properties_free(element);
>    eina_stringshare_del(element->interface);
> @@ -1676,3 +1685,10 @@
>    EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
>    return _e_connman_element_is(element, e_connman_iface_network);
> }
> +
> +bool
> +e_connman_element_is_service(const E_Connman_Element *element)
> +{
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
> +   return _e_connman_element_is(element, e_connman_iface_service);
> +}
>
> Modified: trunk/e_dbus/src/lib/connman/e_connman_manager.c
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/e_connman_manager.c  2009-12-19 21:05:49 UTC 
> (rev 44580)
> +++ trunk/e_dbus/src/lib/connman/e_connman_manager.c  2009-12-19 22:18:02 UTC 
> (rev 44581)
> @@ -328,3 +328,41 @@
>    return e_connman_element_objects_array_get_stringshared
>      (element, e_connman_prop_connections, count, p_elements);
> }
> +
> +/**
> + * Get array of services elements.
> + *
> + * List of service object paths. The list is sorted
> + * internally to have the service with the default
> + * route always first and then the favorite services
> + * followed by scan results.
> + *
> + * This list represents the available services for the
> + * current selected profile. If the profile gets changed
> + * then this list will be updated.
> + *
> + * The same list is available via the profile object
> + * itself. It is just provided here for convenience of
> + * applications only dealing with the current active
> + * profile.
> + *
> + * @param count return the number of elements in array.
> + * @param p_elements array with all elements, these are not referenced
> + *        and in no particular order, just set if return is 1.
> + *
> + * @return 1 on success, 0 otherwise.
> + */
> +bool
> +e_connman_manager_services_get(unsigned int *count, E_Connman_Element 
> ***p_elements)
> +{
> +   E_Connman_Element *element;
> +
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(count, 0);
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(p_elements, 0);
> +
> +   element = e_connman_manager_get();
> +   if (!element)
> +     return 0;
> +   return e_connman_element_objects_array_get_stringshared
> +     (element, e_connman_prop_services, count, p_elements);
> +}
>
> Modified: trunk/e_dbus/src/lib/connman/e_connman_private.h
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/e_connman_private.h  2009-12-19 21:05:49 UTC 
> (rev 44580)
> +++ trunk/e_dbus/src/lib/connman/e_connman_private.h  2009-12-19 22:18:02 UTC 
> (rev 44581)
> @@ -31,6 +31,7 @@
> extern const char *e_connman_prop_powered;
> extern const char *e_connman_prop_priority;
> extern const char *e_connman_prop_profiles;
> +extern const char *e_connman_prop_services;
> extern const char *e_connman_prop_remember;
> extern const char *e_connman_prop_scan_interval;
> extern const char *e_connman_prop_scanning;
> @@ -41,6 +42,19 @@
> extern const char *e_connman_prop_wifi_passphrase;
> extern const char *e_connman_prop_wifi_security;
> extern const char *e_connman_prop_wifi_ssid;
> +extern const char *e_connman_prop_error;
> +extern const char *e_connman_prop_mode;
> +extern const char *e_connman_prop_security;
> +extern const char *e_connman_prop_passphrase;
> +extern const char *e_connman_prop_passphrase_required;
> +extern const char *e_connman_prop_favorite;
> +extern const char *e_connman_prop_auto_connect;
> +extern const char *e_connman_prop_setup_required;
> +extern const char *e_connman_prop_apn;
> +extern const char *e_connman_prop_mcc;
> +extern const char *e_connman_prop_mnc;
> +extern const char *e_connman_prop_roaming;
> +
> extern int _e_dbus_connman_log_dom;
>
> #ifndef EINA_LOG_DEFAULT_COLOR
>
> Modified: trunk/e_dbus/src/lib/connman/e_connman_profile.c
> ===================================================================
> --- trunk/e_dbus/src/lib/connman/e_connman_profile.c  2009-12-19 21:05:49 UTC 
> (rev 44580)
> +++ trunk/e_dbus/src/lib/connman/e_connman_profile.c  2009-12-19 22:18:02 UTC 
> (rev 44581)
> @@ -45,3 +45,75 @@
>    return e_connman_element_property_get_stringshared
>      (profile, e_connman_prop_name, NULL, name);
> }
> +
> +/**
> + * Get property "OfflineMode" value.
> + *
> + * If this property isn't found then 0 is returned.
> + * If zero is returned, then this call failed and parameter-returned
> + * values shall be considered invalid.
> + *
> + * The offline mode indicates the global setting for
> + * switching all radios on or off. Changing offline mode
> + * to true results in powering down all devices.
> + *
> + * @param offline where to store the property value, must be a pointer
> + *        to booleans (bool *).
> + *
> + * @return 1 on success, 0 otherwise.
> + * @see e_connman_profile_offline_mode_set()
> + */
> +bool
> +e_connman_profile_offline_mode_get(const E_Connman_Element *profile, bool 
> *offline)
> +{
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(profile, 0);
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(offline, 0);
> +   return e_connman_element_property_get_stringshared
> +     (profile, e_connman_prop_offline_mode, NULL, offline);
> +}
> +
> +/**
> + * Call method SetProperty("OfflineMode", offline) at the given element on 
> server.
> + *
> + * This is a server call, not local, so it may fail and in that case
> + * no property is updated locally. If the value was set the event
> + * E_CONNMAN_EVENT_ELEMENT_UPDATED will be added to main loop.
> + *
> + * The offline mode indicates the global setting for
> + * switching all radios on or off. Changing offline mode
> + * to true results in powering down all devices.
> + *
> + * @param offline value to set.
> + * @param cb function to call when server replies or some error happens.
> + * @param data data to give to cb when it is called.
> + *
> + * @return 1 on success, 0 otherwise.
> + * @see e_connman_profile_offline_mode_get()
> + */
> +bool
> +e_connman_profile_offline_mode_set(E_Connman_Element *profile, bool offline, 
> E_DBus_Method_Return_Cb cb, const void *data)
> +{
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(profile, 0);
> +   return e_connman_element_property_set_full
> +     (profile, e_connman_prop_offline_mode, DBUS_TYPE_BOOLEAN,
> +      &offline, cb, data);
> +}
> +
> +/**
> + * Get array of service elements.
> + *
> + * @param count return the number of elements in array.
> + * @param p_elements array with all elements, these are not referenced
> + *        and in no particular order, just set if return is 1.
> + *
> + * @return 1 on success, 0 otherwise.
> + */
> +bool
> +e_connman_profile_services_get(const E_Connman_Element *profile, unsigned 
> int *count, E_Connman_Element ***p_elements)
> +{
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(profile, 0);
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(count, 0);
> +   EINA_SAFETY_ON_NULL_RETURN_VAL(p_elements, 0);
> +   return e_connman_element_objects_array_get_stringshared
> +     (profile, e_connman_prop_services, count, p_elements);
> +}
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to