Translation update done using Pootle.
[gammu.git] / tests / bluetooth_checkservicename.c
blob4c6697be5b38bdf15f01ed1b56f4e0df5ade4b38
1 /* Test case for bluetooth_checkservicename */
2 #include <gammu.h>
3 #include <stdlib.h>
4 #include <stdio.h>
5 #include "../libgammu/device/devfunc.h" /* For bluetooth_checkservicename */
6 #include "../libgammu/gsmstate.h" /* For statemachine internals */
7 #include "common.h"
9 GSM_StateMachine *s;
11 void single_test(GSM_ConnectionType conn, const char *name)
13 s->ConnectionType = conn;
14 if (bluetooth_checkservicename(s, name) == 0) {
15 fprintf(stderr, "Test \"%s\" failed!\n", name);
16 exit(2);
20 int main(int argc UNUSED, char **argv UNUSED)
22 /* Allocates state machine */
23 s = GSM_AllocStateMachine();
24 if (s == NULL) {
25 printf("Could not allocate state machine!\n");
26 return 1;
29 single_test(GCT_BLUEPHONET, "Nokia PC Suite");
30 single_test(GCT_BLUEOBEX, "OBEX File Transfer");
31 single_test(GCT_BLUEOBEX, "IrMC Sync");
32 single_test(GCT_BLUEOBEX, "OBEX");
33 single_test(GCT_BLUEAT, "SerialPort1");
34 single_test(GCT_BLUEAT, "Dial-up networking Gateway");
35 single_test(GCT_BLUEAT, "COM");
36 single_test(GCT_BLUEAT, "Serial Server");
38 /* Free state machine */
39 GSM_FreeStateMachine(s);
40 return 0;
43 /* Editor configuration
44 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: