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 technologies176 * transaction that provides the technology and channel type faster but without the reliability of203 * remember all channel references returned via le_dcs_GetChannels() but not all the details about248 * Applications that want to be kept posted about any state changes of the channel can fulfill this250 * For each channel managed by le_dcs, there could be a chain of event handlers provided by multiple317 * The function for an application to start a selected data channel and associate itself with it is356 * With the @c le_dcs interface, connection failures over a channel are handled within the channel357 * itself. Connection retries over another channel of the same or different technology will not be361 * channel. If a different channel is wanted to be tried as a backup that logic and direction needs363 * associated with the channel needs to disassociate from it and re-associate with another channel.369 * Best practices are to retry a reconnect over a certain limited duration with a back-off duration.372 * involving a system-wide blackout, one example is in the cellular packet switched state's becoming379 * (depending on settings like DHCP). The default gateway and DNS addresses for this channel might401 //--------------------------------------------------------------------------------------------------405 //--------------------------------------------------------------------------------------------------408 //--------------------------------------------------------------------------------------------------411 * Connect the current client thread to the service providing this API. Block until the service is414 * For each thread that wants to use this API, either ConnectService or TryConnectService must be415 * called before any other functions in this API. Normally, ConnectService is automatically called420 //--------------------------------------------------------------------------------------------------426 //--------------------------------------------------------------------------------------------------429 * Try to connect the current client thread to the service providing this API. Return with an error432 * For each thread that wants to use this API, either ConnectService or TryConnectService must be433 * called before any other functions in this API. Normally, ConnectService is automatically called442 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).445 //--------------------------------------------------------------------------------------------------451 //--------------------------------------------------------------------------------------------------455 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants458 //--------------------------------------------------------------------------------------------------465 //--------------------------------------------------------------------------------------------------471 * longer a connection to the service, and the functions in this API can't be used. For details, see476 //--------------------------------------------------------------------------------------------------483 //--------------------------------------------------------------------------------------------------487 //--------------------------------------------------------------------------------------------------490 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------497 //--------------------------------------------------------------------------------------------------501 //--------------------------------------------------------------------------------------------------504 //--------------------------------------------------------------------------------------------------508 //--------------------------------------------------------------------------------------------------511 //--------------------------------------------------------------------------------------------------515 * The LE_DCS_EVENT_UP event for a given data channel means that it has been brought up and become518 * The LE_DCS_EVENT_DOWN event means that the given data channel has gone down, been disassociated528 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------535 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------542 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------549 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------556 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------565 //--------------------------------------------------------------------------------------------------576 //--------------------------------------------------------------------------------------------------580 //--------------------------------------------------------------------------------------------------587 //--------------------------------------------------------------------------------------------------594 //--------------------------------------------------------------------------------------------------601 //--------------------------------------------------------------------------------------------------609 //--------------------------------------------------------------------------------------------------622 //--------------------------------------------------------------------------------------------------630 //--------------------------------------------------------------------------------------------------637 //--------------------------------------------------------------------------------------------------641 //--------------------------------------------------------------------------------------------------648 //--------------------------------------------------------------------------------------------------650 * Get the object reference of the channel given by the name and its technology type in the first657 //--------------------------------------------------------------------------------------------------666 //--------------------------------------------------------------------------------------------------668 * Trigger a query for the list of all available data channels that will be returned asynchronously671 //--------------------------------------------------------------------------------------------------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:406void 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)