Translation update done using Pootle.
[gammu.git] / tests / sms-encode-decode.c
blob212e3027dbb63ada8a66704c3ff1005f4f692e67
1 #include <gammu.h>
2 #include "../helper/message-display.h"
3 #include "common.h"
5 int main(int argc UNUSED, char **argv UNUSED)
7 GSM_MultiSMSMessage sms;
8 GSM_Error error;
9 GSM_MultiPartSMSInfo SMSInfo;
10 unsigned char Buffer[800];
12 GSM_ClearMultiPartSMSInfo(&SMSInfo);
13 SMSInfo.EntriesNum = 1;
15 EncodeUnicode(Buffer,
16 ".........1.........2.........3.........4.........5.........6.........7.........8.........9........0"
17 ".........1.........2.........3.........4.........5.........6.........7.........8.........9........0"
18 ".........1.........2.........3.........4.........5.........6.........7.........8.........9........0", 300);
19 SMSInfo.Entries[0].Buffer = Buffer;
20 SMSInfo.Entries[0].ID = SMS_ConcatenatedTextLong;
21 SMSInfo.UnicodeCoding = FALSE;
22 error = GSM_EncodeMultiPartSMS(NULL, &SMSInfo, &sms);
24 gammu_test_result(error, "GSM_EncodeMultiPartSMS");
26 /* Just set some values to sender so that we don't print mess */
27 EncodeUnicode(sms.SMS[0].Number, "321", GSM_MAX_NUMBER_LENGTH);
28 EncodeUnicode(sms.SMS[1].Number, "321", GSM_MAX_NUMBER_LENGTH);
30 /* Display message */
31 DisplayMultiSMSInfo(&sms, FALSE, TRUE, NULL, NULL);
32 DisplayMultiSMSInfo(&sms, TRUE, TRUE, NULL, NULL);
34 return 0;
37 /* Editor configuration
38 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: