sms: Tweak the Bearer API
authorDenis Kenzior <denkenz@gmail.com>
Fri, 25 Jun 2010 22:49:36 +0000 (17:49 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 25 Jun 2010 22:49:36 +0000 (17:49 -0500)
doc/sms-api.txt
src/sms.c

index 87076ca..a11ce21 100644 (file)
@@ -58,7 +58,7 @@ Properties    string ServiceCenterAddress
 
                        Contains the bearer to use for SMS messages.  Possible
                        values are:
-                               "cs" - Circuit Switched only
-                               "ps" - Packet Domain only
-                               "cs_preferred" - Use PS if CS is unavailable
-                               "ps_preferred" - Use CS if PS is unavailable
+                               "cs-only" - Circuit Switched only
+                               "ps-only" - Packet Domain only
+                               "cs-preferred" - Use PS if CS is unavailable
+                               "ps-preferred" - Use CS if PS is unavailable
index 180d14f..c848007 100644 (file)
--- a/src/sms.c
+++ b/src/sms.c
@@ -93,13 +93,13 @@ static const char *sms_bearer_to_string(int bearer)
 {
        switch (bearer) {
        case 0:
-               return "ps";
+               return "ps-only";
        case 1:
-               return "cs";
+               return "cs-only";
        case 2:
-               return "ps_preferred";
+               return "ps-preferred";
        case 3:
-               return "cs_preferred";
+               return "cs-preferred";
        };
 
        return "unknown";
@@ -107,13 +107,13 @@ static const char *sms_bearer_to_string(int bearer)
 
 static int sms_bearer_from_string(const char *str)
 {
-       if (g_str_equal(str, "ps"))
+       if (g_str_equal(str, "ps-only"))
                return 0;
-       else if (g_str_equal(str, "cs"))
+       else if (g_str_equal(str, "cs-only"))
                return 1;
-       else if (g_str_equal(str, "ps_preferred"))
+       else if (g_str_equal(str, "ps-preferred"))
                return 2;
-       else if (g_str_equal(str, "cs_preferred"))
+       else if (g_str_equal(str, "cs-preferred"))
                return 3;
 
        return -1;