le_dcs_interface.h
Go to the documentation of this file.
17 * When applications need to exchange data with other devices on the packet switched data network,25 * about all the data channels available on a device, and administratively start or stop a selected31 * When one application asks DCS to start a specified channel, DCS associates it with this channel;36 * Similarly, it is operationally brought down when its administrative state goes down to indicate66 * path dataConnectionService:/wifi/SSID. Per-SSID configurations are saved now on the wifiService69 * Moreover, confidential user credentials, like passphrase, PSK, user name with password, are now71 * wifiClient, only through which reading and writing of such info can be done. Note that the WiFi73 * reference and debugging. In this way, @c le_dcs keeps technology-specific configurations on the103 * | -------------------------------| -----------------------------------------------------------------------------------------|104 * | le_dcs_GetChannels() | Retrieves the list of all available channels across all supported technologies |107 * | le_dcs_GetState() | Queries for a channel's administrative state and network interface name by its reference |108 * | le_dcs_AddEventHandler() | Adds a channel event notification handler for a specific channel |109 * | le_dcs_RemoveEventHandler() | Removes a channel event notification handler for a specific channel |117 * le_dcs_GetChannels() to obtain an up-to-date list of all channels available over all supported118 * technologies on which are the channel reference and technology type of each available channel.123 * subsequent @c le_dcs APIs. le_dcs_GetChannels() is asynchronous, due to need of some technologies170 * transaction that provides the technology and channel type faster but without the reliability of197 * remember all channel references returned via le_dcs_GetChannels() but not all the details about242 * Applications that want to be kept posted about any state changes of the channel can fulfill this244 * For each channel managed by le_dcs, there could be a chain of event handlers provided by multiple295 * The function for an application to start a selected data channel and associate itself with it is334 * With the @c le_dcs interface, connection failures over a channel are handled within the channel335 * itself. Connection retries over another channel of the same or different technology will not be339 * channel. If a different channel is wanted to be tried as a backup that logic and direction needs341 * associated with the channel needs to disassociate from it and re-associate with another channel.347 * Best practices are to retry a reconnect over a certain limited duration with a back-off duration.350 * involving a system-wide blackout, one example is in the cellular packet switched state's becoming357 * (depending on settings like DHCP). The default gateway and DNS addresses for this channel might379 //--------------------------------------------------------------------------------------------------383 //--------------------------------------------------------------------------------------------------386 //--------------------------------------------------------------------------------------------------389 * Connect the current client thread to the service providing this API. Block until the service is392 * For each thread that wants to use this API, either ConnectService or TryConnectService must be393 * called before any other functions in this API. Normally, ConnectService is automatically called398 //--------------------------------------------------------------------------------------------------404 //--------------------------------------------------------------------------------------------------407 * Try to connect the current client thread to the service providing this API. Return with an error410 * For each thread that wants to use this API, either ConnectService or TryConnectService must be411 * called before any other functions in this API. Normally, ConnectService is automatically called420 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).423 //--------------------------------------------------------------------------------------------------429 //--------------------------------------------------------------------------------------------------433 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants436 //--------------------------------------------------------------------------------------------------443 //--------------------------------------------------------------------------------------------------449 * longer a connection to the service, and the functions in this API can't be used. For details, see454 //--------------------------------------------------------------------------------------------------461 //--------------------------------------------------------------------------------------------------465 //--------------------------------------------------------------------------------------------------468 //--------------------------------------------------------------------------------------------------472 //--------------------------------------------------------------------------------------------------475 //--------------------------------------------------------------------------------------------------479 //--------------------------------------------------------------------------------------------------482 //--------------------------------------------------------------------------------------------------486 //--------------------------------------------------------------------------------------------------489 //--------------------------------------------------------------------------------------------------493 //--------------------------------------------------------------------------------------------------496 //--------------------------------------------------------------------------------------------------500 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------507 //--------------------------------------------------------------------------------------------------510 //--------------------------------------------------------------------------------------------------514 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------521 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------530 //--------------------------------------------------------------------------------------------------541 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------574 //--------------------------------------------------------------------------------------------------587 //--------------------------------------------------------------------------------------------------595 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------606 //--------------------------------------------------------------------------------------------------613 //--------------------------------------------------------------------------------------------------615 * Get the object reference of the channel given by the name and its technology type in the first622 //--------------------------------------------------------------------------------------------------631 //--------------------------------------------------------------------------------------------------633 * Trigger a query for the list of all available data channels that will be returned asynchronously636 //--------------------------------------------------------------------------------------------------le_dcs_EventHandlerRef_t le_dcs_AddEventHandler(le_dcs_ChannelRef_t channelRef, le_dcs_EventHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_dcs_TryConnectService(void)le_dcs_Technology_t le_dcs_GetTechnology(le_dcs_ChannelRef_t channelRef)le_dcs_ReqObjRef_t le_dcs_Start(le_dcs_ChannelRef_t channelRef)void le_dcs_ConnectService(void)LE_FULL_API void le_dcs_SetServerDisconnectHandler(le_dcs_DisconnectHandler_t disconnectHandler, void *contextPtr)le_dcs_ChannelRef_t le_dcs_GetReference(const char *LE_NONNULL name, le_dcs_Technology_t technology)void le_dcs_DisconnectService(void)le_result_t le_dcs_Stop(le_dcs_ReqObjRef_t reqRef)void le_dcs_RemoveEventHandler(le_dcs_EventHandlerRef_t handlerRef)void(* le_dcs_DisconnectHandler_t)(void *)Definition: le_dcs_interface.h:384void le_dcs_GetChannels(le_dcs_GetChannelsHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_dcs_GetState(le_dcs_ChannelRef_t channelRef, le_dcs_State_t *statePtr, char *interfaceName, size_t interfaceNameSize)