le_dcs_interface.h
Go to the documentation of this file.
18 * When applications need to exchange data with other devices on the packet switched data network,26 * about all the data channels available on a device, and administratively start or stop a selected32 * When one application asks DCS to start a specified channel, DCS associates it with this channel;37 * Similarly, it is operationally brought down when its administrative state goes down to indicate67 * path dataConnectionService:/wifi/SSID. Per-SSID configurations are saved now on the wifiService70 * Moreover, confidential user credentials, like passphrase, PSK, user name with password, are now72 * wifiClient, only through which reading and writing of such info can be done. Note that the WiFi74 * reference and debugging. In this way, @c le_dcs keeps technology-specific configurations on the104 * | -------------------------------| -----------------------------------------------------------------------------------------|105 * | le_dcs_GetChannels() | Retrieves the list of all available channels across all supported technologies |108 * | le_dcs_GetState() | Queries for a channel's administrative state and network interface name by its reference |109 * | le_dcs_AddEventHandler() | Adds a channel event notification handler for a specific channel |110 * | le_dcs_RemoveEventHandler() | Removes a channel event notification handler for a specific channel |118 * le_dcs_GetChannels() to obtain an up-to-date list of all channels available over all supported119 * technologies on which are the channel reference and technology type of each available channel.124 * subsequent @c le_dcs APIs. le_dcs_GetChannels() is asynchronous, due to need of some technologies177 * transaction that provides the technology and channel type faster but without the reliability of204 * remember all channel references returned via le_dcs_GetChannels() but not all the details about249 * Applications that want to be kept posted about any state changes of the channel can fulfill this251 * For each channel managed by le_dcs, there could be a chain of event handlers provided by multiple318 * The function for an application to start a selected data channel and associate itself with it is357 * With the @c le_dcs interface, connection failures over a channel are handled within the channel358 * itself. Connection retries over another channel of the same or different technology will not be362 * channel. If a different channel is wanted to be tried as a backup that logic and direction needs364 * associated with the channel needs to disassociate from it and re-associate with another channel.370 * Best practices are to retry a reconnect over a certain limited duration with a back-off duration.373 * involving a system-wide blackout, one example is in the cellular packet switched state's becoming380 * (depending on settings like DHCP). The default gateway and DNS addresses for this channel might406 //--------------------------------------------------------------------------------------------------410 //--------------------------------------------------------------------------------------------------413 //--------------------------------------------------------------------------------------------------416 * Connect the current client thread to the service providing this API. Block until the service is419 * For each thread that wants to use this API, either ConnectService or TryConnectService must be420 * called before any other functions in this API. Normally, ConnectService is automatically called425 //--------------------------------------------------------------------------------------------------431 //--------------------------------------------------------------------------------------------------434 * Try to connect the current client thread to the service providing this API. Return with an error437 * For each thread that wants to use this API, either ConnectService or TryConnectService must be438 * called before any other functions in this API. Normally, ConnectService is automatically called447 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).450 //--------------------------------------------------------------------------------------------------456 //--------------------------------------------------------------------------------------------------460 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants463 //--------------------------------------------------------------------------------------------------470 //--------------------------------------------------------------------------------------------------476 * longer a connection to the service, and the functions in this API can't be used. For details, see481 //--------------------------------------------------------------------------------------------------488 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------495 //--------------------------------------------------------------------------------------------------499 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------509 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------516 //--------------------------------------------------------------------------------------------------520 * The LE_DCS_EVENT_UP event for a given data channel means that it has been brought up and become523 * The LE_DCS_EVENT_DOWN event means that the given data channel has gone down, been disassociated533 //--------------------------------------------------------------------------------------------------536 //--------------------------------------------------------------------------------------------------540 //--------------------------------------------------------------------------------------------------543 //--------------------------------------------------------------------------------------------------547 //--------------------------------------------------------------------------------------------------550 //--------------------------------------------------------------------------------------------------554 //--------------------------------------------------------------------------------------------------557 //--------------------------------------------------------------------------------------------------561 //--------------------------------------------------------------------------------------------------564 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------581 //--------------------------------------------------------------------------------------------------585 //--------------------------------------------------------------------------------------------------592 //--------------------------------------------------------------------------------------------------599 //--------------------------------------------------------------------------------------------------606 //--------------------------------------------------------------------------------------------------614 //--------------------------------------------------------------------------------------------------627 //--------------------------------------------------------------------------------------------------635 //--------------------------------------------------------------------------------------------------642 //--------------------------------------------------------------------------------------------------646 //--------------------------------------------------------------------------------------------------653 //--------------------------------------------------------------------------------------------------655 * Get the object reference of the channel given by the name and its technology type in the first662 //--------------------------------------------------------------------------------------------------671 //--------------------------------------------------------------------------------------------------673 * Trigger a query for the list of all available data channels that will be returned asynchronously676 //--------------------------------------------------------------------------------------------------void le_dcs_RemoveEventHandler(le_dcs_EventHandlerRef_t handlerRef)void le_dcs_GetChannels(le_dcs_GetChannelsHandlerFunc_t handlerPtr, void *contextPtr)void(* le_dcs_EventHandlerFunc_t)(le_dcs_ChannelRef_t channelRef, le_dcs_Event_t event, int32_t code, void *contextPtr)Definition: le_dcs_common.h:177le_result_t le_dcs_TryConnectService(void)le_result_t le_dcs_Stop(le_dcs_ReqObjRef_t reqRef)le_dcs_ReqObjRef_t le_dcs_Start(le_dcs_ChannelRef_t channelRef)void le_dcs_ConnectService(void)struct le_dcs_EventHandler * le_dcs_EventHandlerRef_tDefinition: le_dcs_common.h:153void(* le_dcs_GetChannelsHandlerFunc_t)(le_result_t result, const le_dcs_ChannelInfo_t *channelListPtr, size_t channelListSize, void *contextPtr)Definition: le_dcs_common.h:194void le_dcs_DisconnectService(void)le_result_t le_dcs_GetState(le_dcs_ChannelRef_t channelRef, le_dcs_State_t *statePtr, char *interfaceName, size_t interfaceNameSize)void(* le_dcs_DisconnectHandler_t)(void *)Definition: le_dcs_interface.h:411le_dcs_ChannelRef_t le_dcs_GetReference(const char *LE_NONNULL name, le_dcs_Technology_t technology)le_dcs_Technology_t le_dcs_GetTechnology(le_dcs_ChannelRef_t channelRef)LE_FULL_API void le_dcs_SetServerDisconnectHandler(le_dcs_DisconnectHandler_t disconnectHandler, void *contextPtr)le_dcs_EventHandlerRef_t le_dcs_AddEventHandler(le_dcs_ChannelRef_t channelRef, le_dcs_EventHandlerFunc_t handlerPtr, void *contextPtr)