le_limit_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  * @page c_limit Limit Definitions
14  *
15  * @ref le_limit_interface.h "API Reference"
16  *
17  * This file defines limit definitions used by other APIs.
18  *
19  * <HR>
20  *
21  * Copyright (C) Sierra Wireless Inc.
22  */
23 /**
24  * @file le_limit_interface.h
25  *
26  * Legato @ref c_limit include file.
27  *
28  * Copyright (C) Sierra Wireless Inc.
29  */
30 
31 #ifndef LE_LIMIT_INTERFACE_H_INCLUDE_GUARD
32 #define LE_LIMIT_INTERFACE_H_INCLUDE_GUARD
33 
34 
35 #include "legato.h"
36 
37 // Internal includes for this interface
38 #include "le_limit_common.h"
39 /** @addtogroup le_limit le_limit API Reference
40  * @{
41  * @file le_limit_common.h
42  * @file le_limit_interface.h **/
43 //--------------------------------------------------------------------------------------------------
44 /**
45  * Type for handler called when a server disconnects.
46  */
47 //--------------------------------------------------------------------------------------------------
48 typedef void (*le_limit_DisconnectHandler_t)(void *);
49 
50 //--------------------------------------------------------------------------------------------------
51 /**
52  *
53  * Connect the current client thread to the service providing this API. Block until the service is
54  * available.
55  *
56  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
57  * called before any other functions in this API. Normally, ConnectService is automatically called
58  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
59  *
60  * This function is created automatically.
61  */
62 //--------------------------------------------------------------------------------------------------
64 (
65  void
66 );
67 
68 //--------------------------------------------------------------------------------------------------
69 /**
70  *
71  * Try to connect the current client thread to the service providing this API. Return with an error
72  * if the service is not available.
73  *
74  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
75  * called before any other functions in this API. Normally, ConnectService is automatically called
76  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
77  *
78  * This function is created automatically.
79  *
80  * @return
81  * - LE_OK if the client connected successfully to the service.
82  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
83  * bound.
84  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
85  * - LE_COMM_ERROR if the Service Directory cannot be reached.
86  */
87 //--------------------------------------------------------------------------------------------------
89 (
90  void
91 );
92 
93 //--------------------------------------------------------------------------------------------------
94 /**
95  * Set handler called when server disconnection is detected.
96  *
97  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
98  * to continue without exiting, it should call longjmp() from inside the handler.
99  */
100 //--------------------------------------------------------------------------------------------------
102 (
103  le_limit_DisconnectHandler_t disconnectHandler,
104  void *contextPtr
105 );
106 
107 //--------------------------------------------------------------------------------------------------
108 /**
109  *
110  * Disconnect the current client thread from the service providing this API.
111  *
112  * Normally, this function doesn't need to be called. After this function is called, there's no
113  * longer a connection to the service, and the functions in this API can't be used. For details, see
114  * @ref apiFilesC_client.
115  *
116  * This function is created automatically.
117  */
118 //--------------------------------------------------------------------------------------------------
120 (
121  void
122 );
123 
124 
125 /** @} **/
126 
127 #endif // LE_LIMIT_INTERFACE_H_INCLUDE_GUARD
le_result_t le_limit_TryConnectService(void)
le_result_t
Definition: le_basics.h:46
void(* le_limit_DisconnectHandler_t)(void *)
Definition: le_limit_interface.h:48
void le_limit_DisconnectService(void)
#define LE_FULL_API
Definition: le_apiFeatures.h:40
void le_limit_ConnectService(void)
LE_FULL_API void le_limit_SetServerDisconnectHandler(le_limit_DisconnectHandler_t disconnectHandler, void *contextPtr)