Snapdragon® Telematics Application Framework (TelAF) Interface Specification
le_appInfo_common.h File Reference
#include "legato.h"
#include "le_limit_common.h"

Go to the source code of this file.

Macros

#define IFGEN_LE_APPINFO_PROTOCOL_ID   "092c2f7994c22cecc1e5a2608e1595b0"
 
#define IFGEN_LE_APPINFO_MSG_SIZE   110
 
#define LE_APPINFO_MD5_STR_LEN   32
 

Enumerations

enum  le_appInfo_State_t { LE_APPINFO_STOPPED = 0, LE_APPINFO_RUNNING = 1 }
 
enum  le_appInfo_ProcState_t { LE_APPINFO_PROC_STOPPED = 0, LE_APPINFO_PROC_RUNNING = 1 }
 

Functions

LE_SHARED bool ifgen_le_appInfo_HasLocalBinding (void)
 
LE_SHARED void ifgen_le_appInfo_InitCommonData (void)
 
LE_SHARED void ifgen_le_appInfo_CleanupCommonData (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED le_result_t ifgen_le_appInfo_OpenSession (le_msg_SessionRef_t _ifgen_sessionRef, bool isBlocking)
 
LE_SHARED le_appInfo_State_t ifgen_le_appInfo_GetState (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL appName)
 
LE_SHARED le_appInfo_ProcState_t ifgen_le_appInfo_GetProcState (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL appName, const char *LE_NONNULL procName)
 
LE_SHARED le_result_t ifgen_le_appInfo_GetName (le_msg_SessionRef_t _ifgen_sessionRef, int32_t pid, char *appName, size_t appNameSize)
 
LE_SHARED le_result_t ifgen_le_appInfo_GetHash (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL appName, char *hashStr, size_t hashStrSize)
 

Macro Definition Documentation

◆ IFGEN_LE_APPINFO_PROTOCOL_ID

#define IFGEN_LE_APPINFO_PROTOCOL_ID   "092c2f7994c22cecc1e5a2608e1595b0"

◆ IFGEN_LE_APPINFO_MSG_SIZE

#define IFGEN_LE_APPINFO_MSG_SIZE   110

◆ LE_APPINFO_MD5_STR_LEN

#define LE_APPINFO_MD5_STR_LEN   32

Length of an MD5 hash string.

Enumeration Type Documentation

◆ le_appInfo_State_t

Application states.

Enumerator
LE_APPINFO_STOPPED 

Application has been stopped or never started.

LE_APPINFO_RUNNING 

Application is running.

◆ le_appInfo_ProcState_t

Process states.

Enumerator
LE_APPINFO_PROC_STOPPED 

Process has been stopped or never started.

LE_APPINFO_PROC_RUNNING 

Process is running.

Function Documentation

◆ ifgen_le_appInfo_HasLocalBinding()

LE_SHARED bool ifgen_le_appInfo_HasLocalBinding ( void  )

Get if this client bound locally.

◆ ifgen_le_appInfo_InitCommonData()

LE_SHARED void ifgen_le_appInfo_InitCommonData ( void  )

Init data that is common across all threads

◆ ifgen_le_appInfo_CleanupCommonData()

LE_SHARED void ifgen_le_appInfo_CleanupCommonData ( le_msg_SessionRef_t  _ifgen_sessionRef)

Cleanup the data of a session

◆ ifgen_le_appInfo_OpenSession()

LE_SHARED le_result_t ifgen_le_appInfo_OpenSession ( le_msg_SessionRef_t  _ifgen_sessionRef,
bool  isBlocking 
)

Perform common initialization and open a session

◆ ifgen_le_appInfo_GetState()

LE_SHARED le_appInfo_State_t ifgen_le_appInfo_GetState ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  appName 
)

Gets the state of the specified application. The state of unknown applications is STOPPED.

Returns
The state of the specified application.
Note
If the application name pointer is null or if its string is empty or of bad format it is a fatal error, the function will not return.
Parameters
[in]appNameApplication name.

◆ ifgen_le_appInfo_GetProcState()

LE_SHARED le_appInfo_ProcState_t ifgen_le_appInfo_GetProcState ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  appName,
const char *LE_NONNULL  procName 
)

Gets the state of the specified process in an application. This function only works for configured processes that the Supervisor starts directly.

Returns
The state of the specified process.
Note
If the application or process names pointers are null or if their strings are empty or of bad format it is a fatal error, the function will not return.
Parameters
[in]appNameApplication name.
[in]procNameProcess name.

◆ ifgen_le_appInfo_GetName()

LE_SHARED le_result_t ifgen_le_appInfo_GetName ( le_msg_SessionRef_t  _ifgen_sessionRef,
int32_t  pid,
char *  appName,
size_t  appNameSize 
)

Gets the application name of the process with the specified PID.

Returns
LE_OK if the application name was successfully found. LE_OVERFLOW if the application name could not fit in the provided buffer. LE_NOT_FOUND if the process is not part of an application. LE_FAULT if there was an error.
Parameters
[in]pidPID of the process.
[out]appNameApplication name.
[in]appNameSize

◆ ifgen_le_appInfo_GetHash()

LE_SHARED le_result_t ifgen_le_appInfo_GetHash ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  appName,
char *  hashStr,
size_t  hashStrSize 
)

Gets the application hash as a hexidecimal string. The application hash is a unique hash of the current version of the application.

Returns
LE_OK if the application has was successfully retrieved. LE_OVERFLOW if the application hash could not fit in the provided buffer. LE_NOT_FOUND if the application is not installed. LE_FAULT if there was an error.
Note
If the application name pointer is null or if its string is empty or of bad format it is a fatal error, the function will not return.
Parameters
[in]appNameApplication name.
[out]hashStrHash string.
[in]hashStrSize