le_mdmDefs_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @file le_mdmDefs_interface.h
14  *
15  * Definition file common to multiple modem related services.
16  *
17  * Copyright (C) Sierra Wireless Inc.
18  */
19 
20 #ifndef LE_MDMDEFS_INTERFACE_H_INCLUDE_GUARD
21 #define LE_MDMDEFS_INTERFACE_H_INCLUDE_GUARD
22 
23 
24 #include "legato.h"
25 
26 
27 //--------------------------------------------------------------------------------------------------
28 /**
29  * Type for handler called when a server disconnects.
30  */
31 //--------------------------------------------------------------------------------------------------
32 typedef void (*le_mdmDefs_DisconnectHandler_t)(void *);
33 
34 //--------------------------------------------------------------------------------------------------
35 /**
36  *
37  * Connect the current client thread to the service providing this API. Block until the service is
38  * available.
39  *
40  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
41  * called before any other functions in this API. Normally, ConnectService is automatically called
42  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
43  *
44  * This function is created automatically.
45  */
46 //--------------------------------------------------------------------------------------------------
48 (
49  void
50 );
51 
52 //--------------------------------------------------------------------------------------------------
53 /**
54  *
55  * Try to connect the current client thread to the service providing this API. Return with an error
56  * if the service is not available.
57  *
58  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
59  * called before any other functions in this API. Normally, ConnectService is automatically called
60  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
61  *
62  * This function is created automatically.
63  *
64  * @return
65  * - LE_OK if the client connected successfully to the service.
66  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
67  * bound.
68  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
69  * - LE_COMM_ERROR if the Service Directory cannot be reached.
70  */
71 //--------------------------------------------------------------------------------------------------
73 (
74  void
75 );
76 
77 //--------------------------------------------------------------------------------------------------
78 /**
79  * Set handler called when server disconnection is detected.
80  *
81  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
82  * to continue without exiting, it should call longjmp() from inside the handler.
83  */
84 //--------------------------------------------------------------------------------------------------
86 (
87  le_mdmDefs_DisconnectHandler_t disconnectHandler,
88  void *contextPtr
89 );
90 
91 //--------------------------------------------------------------------------------------------------
92 /**
93  *
94  * Disconnect the current client thread from the service providing this API.
95  *
96  * Normally, this function doesn't need to be called. After this function is called, there's no
97  * longer a connection to the service, and the functions in this API can't be used. For details, see
98  * @ref apiFilesC_client.
99  *
100  * This function is created automatically.
101  */
102 //--------------------------------------------------------------------------------------------------
104 (
105  void
106 );
107 
108 
109 //--------------------------------------------------------------------------------------------------
110 /**
111  * Cf. ITU-T recommendations E.164/E.163. E.164 numbers can have a maximum of 15 digits except the
112  * international prefix ('+' or '00'). One extra byte is added for the null character.
113  */
114 //--------------------------------------------------------------------------------------------------
115 #define LE_MDMDEFS_PHONE_NUM_MAX_LEN 17
116 
117 //--------------------------------------------------------------------------------------------------
118 /**
119  * Cf. ITU-T recommendations E.164/E.163. E.164 numbers can have a maximum of 15 digits except the
120  * international prefix ('+' or '00'). One extra byte is added for the null character.
121  * One extra byte is added for the null character.
122  */
123 //--------------------------------------------------------------------------------------------------
124 #define LE_MDMDEFS_PHONE_NUM_MAX_BYTES 18
125 
126 //--------------------------------------------------------------------------------------------------
127 /**
128  ** IP Version
129  */
130 //--------------------------------------------------------------------------------------------------
131 typedef enum
132 {
134  ///< IPv4 technology
136  ///< IPv6 technology
137  LE_MDMDEFS_IPMAX = 2
138  ///<
139 }
141 
142 
143 #endif // LE_MDMDEFS_INTERFACE_H_INCLUDE_GUARD
le_mdmDefs_IpVersion_t
Definition: le_mdmDefs_interface.h:131
void le_mdmDefs_DisconnectService(void)
le_result_t
Definition: le_basics.h:35
IPv4 technology.
Definition: le_mdmDefs_interface.h:133
void(* le_mdmDefs_DisconnectHandler_t)(void *)
Definition: le_mdmDefs_interface.h:32
le_result_t le_mdmDefs_TryConnectService(void)
void le_mdmDefs_ConnectService(void)
IPv6 technology.
Definition: le_mdmDefs_interface.h:135
void le_mdmDefs_SetServerDisconnectHandler(le_mdmDefs_DisconnectHandler_t disconnectHandler, void *contextPtr)