Changeset 3716
- Timestamp:
- 12/21/07 14:00:39 (5 years ago)
- Location:
- trunk/src/target/OM-2007.2/applications/openmoko-dialer2
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
src/phone-kit/moko-network.c (modified) (1 diff)
-
src/phone-kit/moko-sms-dbus.xml (modified) (1 diff)
-
src/phone-kit/moko-sms.c (modified) (6 diffs)
-
src/phone-kit/moko-sms.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
r3694 r3716 1 2007-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 1 15 2007-12-19 Chris Lord <chris@openedhand.com> 2 16 -
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c
r3561 r3716 384 384 struct gsmd_sms_list *sms = (struct gsmd_sms_list *) aux->data; 385 385 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); 394 389 } 395 390 } else { -
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-sms-dbus.xml
r3553 r3716 9 9 <arg type="s" name="number" /> 10 10 <arg type="s" name="message" /> 11 <arg type="b" name="report" /> 11 12 <arg type="s" name="uid" direction="out" /> 12 13 </method> -
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-sms.c
r3694 r3716 350 350 MokoSmsPrivate *priv = moko_sms->priv; 351 351 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) { 353 356 gchar *ref = g_strdup_printf ("%d", sms->index); 354 357 JanaStoreView *view = jana_store_get_view (priv->sms_store); … … 386 389 } else { 387 390 g_debug ("Sent message rejected"); 391 jana_utils_component_remove_category (JANA_COMPONENT(priv->last_msg), 392 "Sent"); 388 393 jana_utils_component_remove_category (JANA_COMPONENT(priv->last_msg), 389 394 "Sending"); … … 603 608 gboolean 604 609 moko_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) 606 612 { 607 613 PhoneKitNetworkStatus status; … … 638 644 639 645 /* Ask for delivery report */ 640 sms.ask_ds = 1;646 sms.ask_ds = report ? 1 : 0; 641 647 642 648 /* Set destination number */ … … 694 700 695 701 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 } 698 709 699 710 jana_store_add_component (priv->sms_store, … … 703 714 if (priv->last_msg) { 704 715 g_warning ("Confirmation not received for last sent SMS, " 705 "delivery reportwill be lost.");716 "any delivery reports for this message will be lost."); 706 717 g_object_unref (priv->last_msg); 707 priv->last_msg = NULL;708 718 } 709 719 priv->last_msg = note; -
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-sms.h
r3553 r3716 97 97 gboolean 98 98 moko_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); 100 101 101 102 G_END_DECLS
Note: See TracChangeset
for help on using the changeset viewer.
