6 #include "../helper/message-display.h"
7 #include "../helper/message-cmdline.h"
9 int main(int argc
, char **argv
)
11 GSM_MultiSMSMessage sms
;
13 GSM_Message_Type type
= SMS_Display
;
14 GSM_Debug_Info
*debug_info
;
17 /* Configure debugging */
18 debug_info
= GSM_GetGlobalDebug();
19 GSM_SetDebugFileDescriptor(stderr
, FALSE
, debug_info
);
20 /* No debugging as it messes up checking results */
21 GSM_SetDebugLevel("none", debug_info
);
23 error
= CreateMessage(&type
, &sms
, argc
, 1, argv
, NULL
);
24 gammu_test_result(error
, "CreateMessage");
26 DisplayMultiSMSInfo(&sms
, FALSE
, TRUE
, NULL
, NULL
);
27 DisplayMultiSMSInfo(&sms
, TRUE
, TRUE
, NULL
, NULL
);
29 for (i
= 0; i
< sms
.Number
; i
++) {
30 printf("Message number: %i\n", i
);
31 sms
.SMS
[i
].SMSC
.Location
= 0;
32 error
= DisplaySMSFrame(&sms
.SMS
[i
], NULL
);
33 gammu_test_result(error
, "DisplaySMSFrame");
37 printf("Number of messages: %i\n", sms
.Number
);
41 /* Editor configuration
42 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: