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 is320 * @deprecated The DCS functionality to populate the default APN name into the cellular channel's361 * With the @c le_dcs interface, connection failures over a channel are handled within the channel362 * itself. Connection retries over another channel of the same or different technology will not be366 * channel. If a different channel is wanted to be tried as a backup that logic and direction needs368 * associated with the channel needs to disassociate from it and re-associate with another channel.374 * Best practices are to retry a reconnect over a certain limited duration with a back-off duration.377 * involving a system-wide blackout, one example is in the cellular packet switched state's becoming384 * (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 //--------------------------------------------------------------------------------------------------631 * @deprecated The DCS functionality to populate the default APN name into the cellular channel's640 //--------------------------------------------------------------------------------------------------647 //--------------------------------------------------------------------------------------------------651 //--------------------------------------------------------------------------------------------------658 //--------------------------------------------------------------------------------------------------660 * Get the object reference of the channel given by the name and its technology type in the first667 //--------------------------------------------------------------------------------------------------676 //--------------------------------------------------------------------------------------------------678 * Trigger a query for the list of all available data channels that will be returned asynchronously681 //--------------------------------------------------------------------------------------------------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:411void 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)