summaryrefslogtreecommitdiff
path: root/include/libgsmd
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-17 08:29:08 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-08-17 08:29:08 +0000
commit348c9af2fce8d0d53341d9861494b5c13f9796f1 (patch)
treedbd6253c09e77e9c72ff082f2284ed0b6ba9165b /include/libgsmd
parent1c4526b52edc7c245cb76ba801bbbe9da1a3b5ae (diff)
From: Andrzej Zaborowski <balrog@zabor.org>
Date: Thu, 26 Jul 2007 00:32:38 +0200 Subject: [PATCH] SMSC and Preferred Storage operations. This adds setting and retrieval of SMS storage stats (memory type, used entries, all entries), and of the default service centre (SMSC) number for outgoing messages. The operation of setting a new SMSC number is untested because my SIM doesn't seem to allow this (that or I did something wrong). New "libgmsd-tool -m shell" commands for testing are also added. Other changes in this patch: * The third, optional, parameter to +CMGL: is a string, not an integer as I wrongly assumed earlier, this is now corrected. * Rename libgsmd API functions starting with lgsmd_.. to lgsm_.. for consistency with all other identifiers. * Move lgsm_send_simple() to libgsmd.c and add a prototype in lgsm_internals.h, this eliminates some compile-time warnings. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2720 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'include/libgsmd')
-rw-r--r--include/libgsmd/misc.h5
-rw-r--r--include/libgsmd/sms.h20
2 files changed, 17 insertions, 8 deletions
diff --git a/include/libgsmd/misc.h b/include/libgsmd/misc.h
index 672b980..9988518 100644
--- a/include/libgsmd/misc.h
+++ b/include/libgsmd/misc.h
@@ -65,11 +65,6 @@ extern int lgsm_get_netreg_state(struct lgsm_handle *lh,
/* CLIP, CLIR, COLP, Call Forwarding, Call Waiting, Call Deflecting */
/* TBD */
-
-/* SMS related functions */
-/* TBD */
-
-
/* GPRS related functions */
/* TBD */
diff --git a/include/libgsmd/sms.h b/include/libgsmd/sms.h
index 6a62c38..d389b21 100644
--- a/include/libgsmd/sms.h
+++ b/include/libgsmd/sms.h
@@ -61,16 +61,30 @@ extern int lgsm_sms_list(struct lgsm_handle *lh, enum gsmd_msg_sms_type stat);
extern int lgsm_sms_read(struct lgsm_handle *lh, int index);
/* Delete Message */
-extern int lgsmd_sms_delete(struct lgsm_handle *lh,
+extern int lgsm_sms_delete(struct lgsm_handle *lh,
const struct lgsm_sms_delete *sms_del);
/* Send Message */
-extern int lgsmd_sms_send(struct lgsm_handle *lh, const struct lgsm_sms *sms);
+extern int lgsm_sms_send(struct lgsm_handle *lh, const struct lgsm_sms *sms);
/* Write Message to Memory */
-extern int lgsmd_sms_write(struct lgsm_handle *lh,
+extern int lgsm_sms_write(struct lgsm_handle *lh,
const struct lgsm_sms_write *sms_write);
+/* Retrieve SMS storage information */
+extern int lgsm_sms_get_storage(struct lgsm_handle *lh);
+
+/* Set preferred SMS storage */
+extern int lgsm_sms_set_storage(struct lgsm_handle *lh,
+ enum ts0705_mem_type mem1, enum ts0705_mem_type mem2,
+ enum ts0705_mem_type mem3);
+
+/* Retrieve current default service centre address */
+extern int lgsm_sms_get_smsc(struct lgsm_handle *lh);
+
+/* Set new default service centre address */
+extern int lgsm_sms_set_smsc(struct lgsm_handle *lh, const char *number);
+
/* Packing of 7-bit characters, refer to GSM 03.38 subclause 6.1.2.1.1 */
extern int packing_7bit_character(const char *src, struct lgsm_sms *dest);
personal git repositories of Harald Welte. Your mileage may vary