Index: common/gsm-sms.c =================================================================== RCS file: /sources/gnokii/gnokii/common/gsm-sms.c,v retrieving revision 1.171 diff -u -p -r1.171 gsm-sms.c --- common/gsm-sms.c 7 Nov 2007 18:28:18 -0000 1.171 +++ common/gsm-sms.c 21 Nov 2007 11:49:23 -0000 @@ -305,6 +305,7 @@ static gn_error sms_status(unsigned char sms->user_data[1].type = GN_SMS_DATA_None; if (status < 0x03) { snprintf(sms->user_data[0].u.text, sizeof(sms->user_data[0].u.text), "%s", _("Delivered")); + sms->report_status = GN_SMS_Report_Status_Delivered; switch (status) { case 0x00: dprintf("SM received by the SME"); @@ -321,6 +322,7 @@ static gn_error sms_status(unsigned char /* more detailed reason only for debug */ if (status & 0x20) { dprintf("Temporary error, SC is not making any more transfer attempts\n"); + sms->report_status = GN_SMS_Report_Status_Failed_Temporary; switch (status) { case 0x60: @@ -347,6 +349,7 @@ static gn_error sms_status(unsigned char } } else { dprintf("Permanent error, SC is not making any more transfer attempts\n"); + sms->report_status = GN_SMS_Report_Status_Failed_Permanent; switch (status) { case 0x40: dprintf("Remote procedure error"); @@ -385,6 +388,7 @@ static gn_error sms_status(unsigned char } } else if (status & 0x20) { snprintf(sms->user_data[0].u.text, sizeof(sms->user_data[0].u.text), "%s", _("Pending")); + sms->report_status = GN_SMS_Report_Status_Pending; /* more detailed reason only for debug */ dprintf("Temporary error, SC still trying to transfer SM\n"); switch (status) { Index: include/gnokii/sms.h =================================================================== RCS file: /sources/gnokii/gnokii/include/gnokii/sms.h,v retrieving revision 1.69 diff -u -p -r1.69 sms.h --- include/gnokii/sms.h 7 Nov 2007 22:17:16 -0000 1.69 +++ include/gnokii/sms.h 21 Nov 2007 11:49:25 -0000 @@ -294,6 +294,15 @@ typedef struct { gn_sms_command_type type; } gn_sms_message_command; +/* Datatype for SMS Delivery Report Statuses */ +typedef enum { + GN_SMS_Report_Status_Invalid = 0, + GN_SMS_Report_Status_Delivered, + GN_SMS_Report_Status_Failed_Temporary, + GN_SMS_Report_Status_Failed_Permanent, /* FIXME add more reasons for failure? */ + GN_SMS_Report_Status_Pending +} gn_sms_report_status; + /* Datatype for SMS status */ typedef enum { GN_SMS_Read = 0x01, @@ -369,6 +378,7 @@ typedef struct { gn_sms_message_type type; /* Type of the message. */ int delivery_report; /* Do we request the delivery report? Only for setting. */ gn_sms_message_status status; /* Status of the message read/unread/sent/unsent. */ + gn_sms_report_status report_status; /* Status of the delivery reports, only valid if type is GN_SMS_MT_DeliveryReport */ unsigned int validity; /* Message validity in minutes. Only for setting. */ gn_memory_type memory_type; /* Memory type where the message is/should be stored. */ unsigned int number; /* Location of the message in the memory/folder. */