[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multipart Messages
From: |
Pawel Kot |
Subject: |
Multipart Messages |
Date: |
Thu, 30 May 2002 23:45:27 +0200 (CEST) |
Hi Pavel,
See these functions from gsm-sms.c:
API GSM_Error SendLongSMS(GSM_Data *data, GSM_Statemachine *state)
[...]
count = (rawsms->UserDataLength + 127) / 128;
printf("Will need %d sms-es\n", count);
for (i=0; i<count; i++) {
printf("Sending sms #%d\n", i);
sms.UserData[0].Type = SMS_MultiData;
sms.UserData[0].Length = 128;
if (i+1 == count)
sms.UserData[0].Length = rawsms->UserDataLength % 128;
memcpy(sms.UserData[0].u.Multi.Binary, rawsms->UserData +
i*128, 128);
sms.UserData[0].u.Multi.this = i+1;
sms.UserData[0].u.Multi.total = count;
sms.UserData[1].Type = SMS_NoData;
data->SMS = &sms;
error = SendSMS(data, state);
if (error != GE_NONE) return error;
}
return GE_NONE;
[...]
API GSM_Error SendSMS(GSM_Data *data, GSM_Statemachine *state)
[...]
if (data->RawSMS->Length > 171) {
printf("SMS is too long? %d\n", data->RawSMS->Length);
return SendLongSMS(data, state);
}
[...]
Please explain:
- where did you get "171", "127", "128" from?
- how do you want to send concatenated messages (plain text
(default alphabet or unicode) messages with encoded length greater then
140 octets, shown by Nokia phones as "Linked #/#"?
pkot
--
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku
- Multipart Messages,
Pawel Kot <=