Changeset 3716


Ignore:
Timestamp:
12/21/07 14:00:39 (5 years ago)
Author:
chris
Message:
  • src/phone-kit/moko-network.c: (gsmd_eventhandler): Send all delivery status events
  • src/phone-kit/moko-sms-dbus.xml: Make delivery status report optional
  • src/phone-kit/moko-sms.c: (on_incoming_ds), (on_send_sms), (moko_sms_send):
  • src/phone-kit/moko-sms.h: Filter delivery status types correctly (hopefully), make delivery status report optional
Location:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog

    r3694 r3716  
     12007-12-21  Chris Lord  <chris@openedhand.com> 
     2 
     3        * src/phone-kit/moko-network.c: (gsmd_eventhandler): 
     4        Send all delivery status events 
     5 
     6        * src/phone-kit/moko-sms-dbus.xml: 
     7        Make delivery status report optional 
     8 
     9        * src/phone-kit/moko-sms.c: (on_incoming_ds), (on_send_sms), 
     10        (moko_sms_send): 
     11        * src/phone-kit/moko-sms.h: 
     12        Filter delivery status types correctly (hopefully), make delivery status 
     13        report optional 
     14 
    1152007-12-19  Chris Lord  <chris@openedhand.com> 
    216 
  • trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c

    r3561 r3716  
    384384      struct gsmd_sms_list *sms = (struct gsmd_sms_list *) aux->data; 
    385385       
    386       /* TODO: I'm not entirely sure of the spec when if  
    387        *       storing an unsent message means it failed? 
    388        */ 
    389       if (sms->payload.coding_scheme == LGSM_SMS_STO_SENT) { 
    390         for (l = priv->listeners; l; l = l->next) { 
    391           moko_listener_on_incoming_ds (MOKO_LISTENER (l->data), priv->handle, 
    392                                         sms); 
    393         } 
     386      for (l = priv->listeners; l; l = l->next) { 
     387        moko_listener_on_incoming_ds (MOKO_LISTENER (l->data), priv->handle, 
     388                                      sms); 
    394389      } 
    395390    } else { 
  • trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-sms-dbus.xml

    r3553 r3716  
    99    <arg type="s" name="number" /> 
    1010    <arg type="s" name="message" /> 
     11    <arg type="b" name="report" /> 
    1112    <arg type="s" name="uid" direction="out" /> 
    1213  </method> 
  • trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-sms.c

    r3694 r3716  
    350350  MokoSmsPrivate *priv = moko_sms->priv; 
    351351 
    352   if (sms->payload.coding_scheme == LGSM_SMS_STO_SENT) { 
     352  /* TODO: I'm not entirely sure of the spec when if  
     353   *       storing an unsent message means it failed? 
     354   */ 
     355  if (sms->stat == GSMD_SMS_STO_SENT) { 
    353356    gchar *ref = g_strdup_printf ("%d", sms->index); 
    354357    JanaStoreView *view = jana_store_get_view (priv->sms_store); 
     
    386389    } else { 
    387390      g_debug ("Sent message rejected"); 
     391      jana_utils_component_remove_category (JANA_COMPONENT(priv->last_msg), 
     392                                            "Sent"); 
    388393      jana_utils_component_remove_category (JANA_COMPONENT(priv->last_msg), 
    389394                                            "Sending"); 
     
    603608gboolean 
    604609moko_sms_send (MokoSms *self, const gchar *number, 
    605                const gchar *message, gchar **uid, GError **error) 
     610               const gchar *message, gboolean report, gchar **uid, 
     611               GError **error) 
    606612{ 
    607613  PhoneKitNetworkStatus status; 
     
    638644   
    639645  /* Ask for delivery report */ 
    640   sms.ask_ds = 1; 
     646  sms.ask_ds = report ? 1 : 0; 
    641647   
    642648  /* Set destination number */ 
     
    694700   
    695701  jana_note_set_body (note, message); 
    696   jana_component_set_categories (JANA_COMPONENT (note), 
    697     (const gchar *[]){ "Sending", NULL}); 
     702  if (report) { 
     703    jana_component_set_categories (JANA_COMPONENT (note), 
     704                                   (const gchar *[]){ "Sending", NULL}); 
     705  } else { 
     706    jana_component_set_categories (JANA_COMPONENT (note), 
     707                                   (const gchar *[]){ "Sent", NULL}); 
     708  } 
    698709   
    699710  jana_store_add_component (priv->sms_store, 
     
    703714  if (priv->last_msg) { 
    704715    g_warning ("Confirmation not received for last sent SMS, " 
    705       "delivery report will be lost."); 
     716               "any delivery reports for this message will be lost."); 
    706717    g_object_unref (priv->last_msg); 
    707     priv->last_msg = NULL; 
    708718  } 
    709719  priv->last_msg = note; 
  • trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-sms.h

    r3553 r3716  
    9797gboolean 
    9898moko_sms_send (MokoSms *self, const gchar *number, 
    99                const gchar *message, gchar **uid, GError **error); 
     99               const gchar *message, gboolean report, gchar **uid, 
     100               GError **error); 
    100101 
    101102G_END_DECLS 
Note: See TracChangeset for help on using the changeset viewer.