Diffstat (limited to 'gammu/emb/common/service/sms/gsmsms.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/service/sms/gsmsms.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gammu/emb/common/service/sms/gsmsms.c b/gammu/emb/common/service/sms/gsmsms.c index 9920835..feceba4 100644 --- a/gammu/emb/common/service/sms/gsmsms.c +++ b/gammu/emb/common/service/sms/gsmsms.c | |||
@@ -1,50 +1,53 @@ | |||
1 | /* (c) 2001-2004 by Marcin Wiacek */ | 1 | /* (c) 2001-2004 by Marcin Wiacek */ |
2 | /* based on some work from Pawel Kot, others and Gnokii */ | 2 | /* Based on some Pawel Kot and others work from Gnokii (www.gnokii.org) |
3 | * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot | ||
4 | * GNU GPL version 2 or later | ||
5 | */ | ||
3 | 6 | ||
4 | #include <ctype.h> | 7 | #include <ctype.h> |
5 | #include <string.h> | 8 | #include <string.h> |
6 | #include <time.h> | 9 | #include <time.h> |
7 | 10 | ||
8 | #include "../../gsmcomon.h" | 11 | #include "../../gsmcomon.h" |
9 | #include "../../misc/coding/coding.h" | 12 | #include "../../misc/coding/coding.h" |
10 | #include "../gsmcal.h" | 13 | #include "../gsmcal.h" |
11 | #include "../gsmpbk.h" | 14 | #include "../gsmpbk.h" |
12 | #include "../gsmlogo.h" | 15 | #include "../gsmlogo.h" |
13 | #include "../gsmring.h" | 16 | #include "../gsmring.h" |
14 | #include "../gsmdata.h" | 17 | #include "../gsmdata.h" |
15 | #include "../gsmnet.h" | 18 | #include "../gsmnet.h" |
16 | #include "gsmsms.h" | 19 | #include "gsmsms.h" |
17 | 20 | ||
18 | /* User data headers */ | 21 | /* User data headers */ |
19 | static GSM_UDHHeader UDHHeaders[] = { | 22 | static GSM_UDHHeader UDHHeaders[] = { |
20 | /* See GSM 03.40 section 9.2.3.24.1 | 23 | /* See GSM 03.40 section 9.2.3.24.1 |
21 | * 1 byte 0x00 | 24 | * 1 byte 0x00 |
22 | * 1 byte 0x03 | 25 | * 1 byte 0x03 |
23 | * 1 byte 0x01: unique ID for message series | 26 | * 1 byte 0x01: unique ID for message series |
24 | * 1 byte 0x00: how many SMS in sequence | 27 | * 1 byte 0x00: how many SMS in sequence |
25 | * 1 byte 0x00: number of current SMS in sequence */ | 28 | * 1 byte 0x00: number of current SMS in sequence */ |
26 | { UDH_ConcatenatedMessages, 0x05, "\x00\x03\x01\x00\x00",2,-1,4,3}, | 29 | { UDH_ConcatenatedMessages, 0x05, "\x00\x03\x01\x00\x00",2,-1,4,3}, |
27 | 30 | ||
28 | /* See GSM 03.40 section 9.2.3.24.2 for voice, fax and email messages */ | 31 | /* See GSM 03.40 section 9.2.3.24.2 for voice, fax and email messages */ |
29 | { UDH_DisableVoice, 0x04, "\x01\x02\x00\x00",-1,-1,-1,-1}, | 32 | { UDH_DisableVoice, 0x04, "\x01\x02\x00\x00",-1,-1,-1,-1}, |
30 | { UDH_DisableFax, 0x04, "\x01\x02\x01\x00",-1,-1,-1,-1}, | 33 | { UDH_DisableFax, 0x04, "\x01\x02\x01\x00",-1,-1,-1,-1}, |
31 | { UDH_DisableEmail, 0x04, "\x01\x02\x02\x00",-1,-1,-1,-1}, | 34 | { UDH_DisableEmail, 0x04, "\x01\x02\x02\x00",-1,-1,-1,-1}, |
32 | { UDH_EnableVoice, 0x04, "\x01\x02\x00\x01",-1,-1,-1,-1}, | 35 | { UDH_EnableVoice, 0x04, "\x01\x02\x00\x01",-1,-1,-1,-1}, |
33 | { UDH_EnableFax, 0x04, "\x01\x02\x01\x01",-1,-1,-1,-1}, | 36 | { UDH_EnableFax, 0x04, "\x01\x02\x01\x01",-1,-1,-1,-1}, |
34 | { UDH_EnableEmail, 0x04, "\x01\x02\x02\x01",-1,-1,-1,-1}, | 37 | { UDH_EnableEmail, 0x04, "\x01\x02\x02\x01",-1,-1,-1,-1}, |
35 | 38 | ||
36 | /* When send such SMS to some phones, they don't display anything, | 39 | /* When send such SMS to some phones, they don't display anything, |
37 | * only beep and enable vibra/light | 40 | * only beep and enable vibra/light |
38 | */ | 41 | */ |
39 | { UDH_VoidSMS, 0x08, "\x01\x02\x02\x01\x01\x02\x02\x00",-1,-1,-1,-1}, | 42 | { UDH_VoidSMS, 0x08, "\x01\x02\x02\x01\x01\x02\x02\x00",-1,-1,-1,-1}, |
40 | 43 | ||
41 | /* Nokia Smart Messaging (short version) UDH | 44 | /* Nokia Smart Messaging (short version) UDH |
42 | * General format : | 45 | * General format : |
43 | * 1 byte 0x05 : IEI application port addressing scheme, 16 bit address | 46 | * 1 byte 0x05 : IEI application port addressing scheme, 16 bit address |
44 | * 1 byte 0x04 : IEI length | 47 | * 1 byte 0x04 : IEI length |
45 | * 2 bytes : destination address : high & low byte | 48 | * 2 bytes : destination address : high & low byte |
46 | * 2 bytes 0x00 0x00 : originator address : high & low byte */ | 49 | * 2 bytes 0x00 0x00 : originator address : high & low byte */ |
47 | { UDH_NokiaRingtone, 0x06, "\x05\x04\x15\x81\x00\x00",-1,-1,-1,-1}, | 50 | { UDH_NokiaRingtone, 0x06, "\x05\x04\x15\x81\x00\x00",-1,-1,-1,-1}, |
48 | { UDH_NokiaOperatorLogo, 0x06, "\x05\x04\x15\x82\x00\x00",-1,-1,-1,-1}, | 51 | { UDH_NokiaOperatorLogo, 0x06, "\x05\x04\x15\x82\x00\x00",-1,-1,-1,-1}, |
49 | { UDH_NokiaCallerLogo, 0x06, "\x05\x04\x15\x83\x00\x00",-1,-1,-1,-1}, | 52 | { UDH_NokiaCallerLogo, 0x06, "\x05\x04\x15\x83\x00\x00",-1,-1,-1,-1}, |
50 | { UDH_NokiaWAP, 0x06, "\x05\x04\xc3\x4f\x00\x00",-1,-1,-1,-1}, | 53 | { UDH_NokiaWAP, 0x06, "\x05\x04\xc3\x4f\x00\x00",-1,-1,-1,-1}, |