summaryrefslogtreecommitdiffstats
path: root/src/smsutil.h
diff options
context:
space:
mode:
authorPasi Miettinen <pasi.miettinen@ixonos.com>2010-06-17 16:14:54 +0300
committerDenis Kenzior <denkenz@gmail.com>2010-06-21 10:52:27 -0500
commita7372209f3cfb6c5d06f84f371a93caeb658d3d7 (patch)
tree9b85a89efe6fe0faeef22405cc361624518a6f8a /src/smsutil.h
parent84a106b92d44fd85029f9f4ee7ce8193b6898641 (diff)
downloadofono-a7372209f3cfb6c5d06f84f371a93caeb658d3d7.tar.bz2
smsutil: Status report assembly
Diffstat (limited to 'src/smsutil.h')
-rw-r--r--src/smsutil.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/smsutil.h b/src/smsutil.h
index d7026ec3..0ea289a2 100644
--- a/src/smsutil.h
+++ b/src/smsutil.h
@@ -19,6 +19,8 @@
*
*/
+#include "history.h"
+
#define CBS_MAX_GSM_CHARS 93
enum sms_type {
@@ -364,6 +366,20 @@ struct sms_assembly {
GSList *assembly_list;
};
+struct id_table_node {
+ struct sms_address to;
+ unsigned int mrs[8];
+ time_t expiration;
+ unsigned char total_mrs;
+ unsigned char sent_mrs;
+ gboolean deliverable;
+};
+
+struct status_report_assembly {
+ const char *imsi;
+ GHashTable *assembly_table;
+};
+
struct cbs {
enum cbs_geo_scope gs; /* 2 bits */
guint16 message_code; /* 10 bits */
@@ -481,6 +497,21 @@ GSList *sms_assembly_add_fragment(struct sms_assembly *assembly,
guint16 ref, guint8 max, guint8 seq);
void sms_assembly_expire(struct sms_assembly *assembly, time_t before);
+struct status_report_assembly *status_report_assembly_new(const char *imsi);
+void status_report_assembly_free(struct status_report_assembly *assembly);
+gboolean status_report_assembly_report(struct status_report_assembly *assembly,
+ const struct sms *status_report,
+ unsigned int *msg_id,
+ gboolean *msg_delivered);
+void status_report_assembly_add_fragment(struct status_report_assembly
+ *assembly, unsigned int msg_id,
+ const struct sms_address *to,
+ unsigned char mr, time_t expiration,
+ unsigned char total_mrs);
+void status_report_assembly_expire(struct status_report_assembly *assembly,
+ time_t before, GFunc foreach_func,
+ gpointer data);
+
GSList *sms_text_prepare(const char *utf8, guint16 ref,
gboolean use_16bit, int *ref_offset,
gboolean use_delivery_reports);