le_framework_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_framework Framework Control API
14  *
15  * @ref le_framework_interface.h "API Reference"
16  *
17  * API for controlling the framework. This API should only be made available to privileged users.
18  *
19  * @section legatoServicesSupervisor_binding Binding
20  *
21  * You can use a definition @c .adef file to bind your client-side app and component to the
22  * server-side Framework Control service.
23  *
24  * This code sample shows how to bind an app to this service:
25  * @code
26  * bindings
27  * {
28  * myExe.myComp.le_framework -> <root>.le_framework
29  * }
30  * @endcode
31  *
32  * See @ref defFilesAdef for details.
33  *
34  * <HR>
35  *
36  * Copyright (C) Sierra Wireless Inc.
37  */
38 /**
39  * @file le_framework_interface.h
40  *
41  * Legato @ref c_framework include file.
42  *
43  * Copyright (C) Sierra Wireless Inc.
44  */
45 
46 #ifndef LE_FRAMEWORK_INTERFACE_H_INCLUDE_GUARD
47 #define LE_FRAMEWORK_INTERFACE_H_INCLUDE_GUARD
48 
49 
50 #include "legato.h"
51 
52 
53 //--------------------------------------------------------------------------------------------------
54 /**
55  * Type for handler called when a server disconnects.
56  */
57 //--------------------------------------------------------------------------------------------------
58 typedef void (*le_framework_DisconnectHandler_t)(void *);
59 
60 //--------------------------------------------------------------------------------------------------
61 /**
62  *
63  * Connect the current client thread to the service providing this API. Block until the service is
64  * available.
65  *
66  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
67  * called before any other functions in this API. Normally, ConnectService is automatically called
68  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
69  *
70  * This function is created automatically.
71  */
72 //--------------------------------------------------------------------------------------------------
74 (
75  void
76 );
77 
78 //--------------------------------------------------------------------------------------------------
79 /**
80  *
81  * Try to connect the current client thread to the service providing this API. Return with an error
82  * if the service is not available.
83  *
84  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
85  * called before any other functions in this API. Normally, ConnectService is automatically called
86  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
87  *
88  * This function is created automatically.
89  *
90  * @return
91  * - LE_OK if the client connected successfully to the service.
92  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
93  * bound.
94  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
95  * - LE_COMM_ERROR if the Service Directory cannot be reached.
96  */
97 //--------------------------------------------------------------------------------------------------
99 (
100  void
101 );
102 
103 //--------------------------------------------------------------------------------------------------
104 /**
105  * Set handler called when server disconnection is detected.
106  *
107  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
108  * to continue without exiting, it should call longjmp() from inside the handler.
109  */
110 //--------------------------------------------------------------------------------------------------
112 (
113  le_framework_DisconnectHandler_t disconnectHandler,
114  void *contextPtr
115 );
116 
117 //--------------------------------------------------------------------------------------------------
118 /**
119  *
120  * Disconnect the current client thread from the service providing this API.
121  *
122  * Normally, this function doesn't need to be called. After this function is called, there's no
123  * longer a connection to the service, and the functions in this API can't be used. For details, see
124  * @ref apiFilesC_client.
125  *
126  * This function is created automatically.
127  */
128 //--------------------------------------------------------------------------------------------------
130 (
131  void
132 );
133 
134 
135 //--------------------------------------------------------------------------------------------------
136 /**
137  * Stops the Legato framework.
138  *
139  * @return
140  * LE_OK if successful.
141  * LE_DUPLICATE if the framework is in the process of shutting down (perhaps someone else has
142  * already requested the framework be stopped or restarted).
143  */
144 //--------------------------------------------------------------------------------------------------
146 (
147  void
148 );
149 
150 //--------------------------------------------------------------------------------------------------
151 /**
152  * Restarts the Legato framework.
153  *
154  * @return
155  * LE_OK if the request was accepted and the restart procedure has begun.
156  * LE_DUPLICATE if the framework is already in the process of shutting down (perhaps someone
157  * else has already requested the framework be stopped or restarted).
158  */
159 //--------------------------------------------------------------------------------------------------
161 (
162  bool manualRestart
163  ///< [IN] Was the restart manually triggered e.g. "legato restart"
164 );
165 
166 //--------------------------------------------------------------------------------------------------
167 /**
168  * Reports if the Legato framework is stopping.
169  *
170  * @return
171  * true if the framework is stopping or rebooting
172  * false otherwise
173  */
174 //--------------------------------------------------------------------------------------------------
176 (
177  void
178 );
179 
180 //--------------------------------------------------------------------------------------------------
181 /**
182  * Checks whether legato framework is Read-Only or not.
183  *
184  * @return
185  * true if the framework is Read-Only
186  * false otherwise
187  */
188 //--------------------------------------------------------------------------------------------------
190 (
191  void
192 );
193 
194 //--------------------------------------------------------------------------------------------------
195 /**
196  * Mark the next reboot as expected. Should be called by short lived app that shutdown platform
197  * after a small wakeup. This prevents system not to rollback on expected reboot.
198  */
199 //--------------------------------------------------------------------------------------------------
201 (
202  void
203 );
204 
205 #endif // LE_FRAMEWORK_INTERFACE_H_INCLUDE_GUARD
le_result_t
Definition: le_basics.h:35
void le_framework_DisconnectService(void)
le_result_t le_framework_Restart(bool manualRestart)
void le_framework_NotifyExpectedReboot(void)
le_result_t le_framework_TryConnectService(void)
le_result_t le_framework_Stop(void)
bool le_framework_IsStopping(void)
bool le_framework_IsReadOnly(void)
void le_framework_ConnectService(void)
void(* le_framework_DisconnectHandler_t)(void *)
Definition: le_framework_interface.h:58
void le_framework_SetServerDisconnectHandler(le_framework_DisconnectHandler_t disconnectHandler, void *contextPtr)