appSmack_interface.h File Reference
#include "legato.h"
#include "le_limit_interface.h"

Go to the source code of this file.

Macros

#define APPSMACK_LABEL_LEN   23
 

Enumerations

enum  appSmack_AccessFlags_t { APPSMACK_ACCESS_FLAG_READ = 0x1, APPSMACK_ACCESS_FLAG_WRITE = 0x2, APPSMACK_ACCESS_FLAG_EXECUTE = 0x4 }
 

Functions

void appSmack_ConnectService (void)
 
void appSmack_DisconnectService (void)
 
void appSmack_GetLabel (const char *appName, char *label, size_t labelNumElements)
 
void appSmack_GetAccessLabel (const char *appName, appSmack_AccessFlags_t accessMode, char *label, size_t labelNumElements)
 

Detailed Description

Legato Application SMACK API include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Macro Definition Documentation

#define APPSMACK_LABEL_LEN   23

Maximum length of SMACK labels.

Enumeration Type Documentation

Access flags.

Function Documentation

void appSmack_ConnectService ( void  )

Connect the client to the service

void appSmack_DisconnectService ( void  )

Disconnect the client from the service

void appSmack_GetAccessLabel ( const char *  appName,
appSmack_AccessFlags_t  accessMode,
char *  label,
size_t  labelNumElements 
)

Get's the application's SMACK label with the access mode appended to it as a string. For example, if the accessMode is ACCESS_FLAG_READ | ACCESS_FLAG_WRITE then "rw" will be appended to the application's SMACK label. If the accessMode is 0 (empty) then "-" will be appended to the app's SMACK label.

Note
The application need not be installed for this function to succeed.
Parameters
[in]appNameApplication name
[in]accessModeAccess mode flags
[out]labelSMACK label for the application
[in]labelNumElements
void appSmack_GetLabel ( const char *  appName,
char *  label,
size_t  labelNumElements 
)

Gets the application's SMACK label.

Note
The app doesn't need to be installed for this function to succeed.
Parameters
[in]appNameApplication name
[out]labelSMACK label for the application
[in]labelNumElements