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 // Internal includes for this interface
27 #include "le_mdmDefs_common.h"
28 /** @addtogroup le_mdmDefs le_mdmDefs API Reference
29  * @{
30  * @file le_mdmDefs_common.h
31  * @file le_mdmDefs_interface.h **/
32 //--------------------------------------------------------------------------------------------------
33 /**
34  * Type for handler called when a server disconnects.
35  */
36 //--------------------------------------------------------------------------------------------------
37 typedef void (*le_mdmDefs_DisconnectHandler_t)(void *);
38 
39 //--------------------------------------------------------------------------------------------------
40 /**
41  *
42  * Connect the current client thread to the service providing this API. Block until the service is
43  * available.
44  *
45  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
46  * called before any other functions in this API. Normally, ConnectService is automatically called
47  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
48  *
49  * This function is created automatically.
50  */
51 //--------------------------------------------------------------------------------------------------
53 (
54  void
55 );
56 
57 //--------------------------------------------------------------------------------------------------
58 /**
59  *
60  * Try to connect the current client thread to the service providing this API. Return with an error
61  * if the service is not available.
62  *
63  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
64  * called before any other functions in this API. Normally, ConnectService is automatically called
65  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
66  *
67  * This function is created automatically.
68  *
69  * @return
70  * - LE_OK if the client connected successfully to the service.
71  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
72  * bound.
73  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
74  * - LE_COMM_ERROR if the Service Directory cannot be reached.
75  */
76 //--------------------------------------------------------------------------------------------------
78 (
79  void
80 );
81 
82 //--------------------------------------------------------------------------------------------------
83 /**
84  * Set handler called when server disconnection is detected.
85  *
86  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
87  * to continue without exiting, it should call longjmp() from inside the handler.
88  */
89 //--------------------------------------------------------------------------------------------------
91 (
92  le_mdmDefs_DisconnectHandler_t disconnectHandler,
93  void *contextPtr
94 );
95 
96 //--------------------------------------------------------------------------------------------------
97 /**
98  *
99  * Disconnect the current client thread from the service providing this API.
100  *
101  * Normally, this function doesn't need to be called. After this function is called, there's no
102  * longer a connection to the service, and the functions in this API can't be used. For details, see
103  * @ref apiFilesC_client.
104  *
105  * This function is created automatically.
106  */
107 //--------------------------------------------------------------------------------------------------
109 (
110  void
111 );
112 
113 
114 //--------------------------------------------------------------------------------------------------
115 /**
116  ** IP Version
117  */
118 //--------------------------------------------------------------------------------------------------
119 
120 
121 /** @} **/
122 
123 #endif // LE_MDMDEFS_INTERFACE_H_INCLUDE_GUARD
le_result_t
Definition: le_basics.h:46
void(* le_mdmDefs_DisconnectHandler_t)(void *)
Definition: le_mdmDefs_interface.h:37
LE_FULL_API void le_mdmDefs_SetServerDisconnectHandler(le_mdmDefs_DisconnectHandler_t disconnectHandler, void *contextPtr)
le_result_t le_mdmDefs_TryConnectService(void)
#define LE_FULL_API
Definition: le_apiFeatures.h:40
void le_mdmDefs_DisconnectService(void)
void le_mdmDefs_ConnectService(void)