le_posCtrl_interface.h

Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * @page c_posCtrl Positioning Control API
12  *
13  * @ref le_posCtrl_interface.h "API Reference"
14  *
15  * <HR>
16  *
17  * This API is used to enable and disable the positioning service.
18  *
19  * All other positioning functionality is provided by the @ref c_pos.
20  *
21  * @section le_posCtrl_binding IPC interfaces binding
22  *
23  * All the functions of this API are provided by the @b positioningService application service.
24  *
25  * Here's a code sample binding to Positioning services:
26  * @verbatim
27  bindings:
28  {
29  clientExe.clientComponent.le_posCtrl -> positioningService.le_posCtrl
30  }
31  @endverbatim
32  *
33  * @section le_posCtrl_ctrl Positioning control
34  *
35  * To request that the positioning service be activated, call le_posCtrl_Request().
36  *
37  * To release the positioning service when finished with it, call le_posCtrl_Release().
38  *
39  * If the positioning service is already active when le_posCtrl_Request() is called, it will remain
40  * active. This happens if another application has already requested that the positioning service
41  * be activated and not yet released the positioning service.
42  *
43  * The positioning service (and associated devices) will not necessarily be switched off when
44  * an application calls le_posCtrl_Release(). The positioning service will be switched off only
45  * after all applications that have requested that the positioning service be active have also
46  * released the positioning service.
47  *
48  * @note Control of the positioning service is done through a separate API than the retrieval
49  * of positioning information to allow access to positioning information by less-trusted
50  * applications, while only allowing control of the positioning system by more-trusted
51  * applications.
52  *
53  * <HR>
54  *
55  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
56  */
57 /**
58  * @file le_posCtrl_interface.h
59  *
60  * Legato @ref c_posCtrl include file.
61  *
62  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
63  */
64 
65 #ifndef LE_POSCTRL_INTERFACE_H_INCLUDE_GUARD
66 #define LE_POSCTRL_INTERFACE_H_INCLUDE_GUARD
67 
68 
69 #include "legato.h"
70 
71 //--------------------------------------------------------------------------------------------------
72 /**
73  *
74  * Connect the current client thread to the service providing this API. Block until the service is
75  * available.
76  *
77  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
78  * called before any other functions in this API. Normally, ConnectService is automatically called
79  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
80  *
81  * This function is created automatically.
82  */
83 //--------------------------------------------------------------------------------------------------
85 (
86  void
87 );
88 
89 //--------------------------------------------------------------------------------------------------
90 /**
91  *
92  * Try to connect the current client thread to the service providing this API. Return with an error
93  * if the service is not available.
94  *
95  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
96  * called before any other functions in this API. Normally, ConnectService is automatically called
97  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
98  *
99  * This function is created automatically.
100  *
101  * @return
102  * - LE_OK if the client connected successfully to the service.
103  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
104  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
105  * - LE_COMM_ERROR if the Service Directory cannot be reached.
106  */
107 //--------------------------------------------------------------------------------------------------
109 (
110  void
111 );
112 
113 //--------------------------------------------------------------------------------------------------
114 /**
115  *
116  * Disconnect the current client thread from the service providing this API.
117  *
118  * Normally, this function doesn't need to be called. After this function is called, there's no
119  * longer a connection to the service, and the functions in this API can't be used. For details, see
120  * @ref apiFilesC_client.
121  *
122  * This function is created automatically.
123  */
124 //--------------------------------------------------------------------------------------------------
126 (
127  void
128 );
129 
130 
131 //--------------------------------------------------------------------------------------------------
132 /**
133  * Reference type for dealing with Position Service management.
134  */
135 //--------------------------------------------------------------------------------------------------
136 typedef struct le_posCtrl_Activation* le_posCtrl_ActivationRef_t;
137 
138 //--------------------------------------------------------------------------------------------------
139 /**
140  * Request activation of the positioning service.
141  *
142  * @return
143  * - Reference to the service activation request (to be used later for releasing the request).
144  * - NULL if the service request could not be processed.
145  *
146  */
147 //--------------------------------------------------------------------------------------------------
149 (
150  void
151 );
152 
153 //--------------------------------------------------------------------------------------------------
154 /**
155  * Release the positioning service.
156  *
157  */
158 //--------------------------------------------------------------------------------------------------
160 (
162  ///< [IN] Reference to a positioning service activation request.
163 );
164 
165 
166 #endif // LE_POSCTRL_INTERFACE_H_INCLUDE_GUARD
167 
le_result_t
Definition: le_basics.h:35
le_result_t le_posCtrl_TryConnectService(void)
void le_posCtrl_Release(le_posCtrl_ActivationRef_t ref)
void le_posCtrl_DisconnectService(void)
void le_posCtrl_ConnectService(void)
struct le_posCtrl_Activation * le_posCtrl_ActivationRef_t
Definition: le_posCtrl_interface.h:136
le_posCtrl_ActivationRef_t le_posCtrl_Request(void)