SWILIB API (SG)    
Loading...
Searching...
No Matches
Info

Detailed Description

Getting miscellaneous phone info.

Usage: #include <swilib.h> or #include <swilib/info.h>

Enumerations

enum  PhoneInfoID {
  PI_BASE_INFO1 = 0 ,
  PI_BASE_INFO2 = 1 ,
  PI_BASE_INFO3 = 2 ,
  PI_BASE_INFO4 = 3 ,
  PI_BUILD = 4 ,
  PI_DATETIME1 = 5 ,
  PI_DATETIME2 = 6 ,
  PI_SW_NUMBER = 7 ,
  PI_VENDOR = 8 ,
  PI_MODEL = 9 ,
  PI_LG = 10 ,
  PI_T9 = 11
}
 Phone info indexes for the Get_Phone_Info. More...
 
enum  BatChargingStateID {
  BAT_STATE_DISCHARGING = 0 ,
  BAT_STATE_UNKNOWN = 1 ,
  BAT_STATE_CHARGING = 2 ,
  BAT_STATE_FULLY_CHARGED = 3
}
 Battery charging state. More...
 

Functions

int GetFreeRamAvail ()
 Get free RAM.
 
int * RamTotalHeapSize (void)
 Get total size of the HEAP.
 
int * RamTemporaryHeapSize (void)
 Get total size of the non-perm HEAP.
 
uint32_t GetMMIMemUsed ()
 Get memory used by MMI.
 
char * Get_Phone_Info (int index)
 Get basic phone info.
 

Language

char * GetCurrentLocale (void)
 Get the phone's language.
 
char * RamDisplayLanguage ()
 Get the phone's language.
 

Charging and battery

int GetAkku (int param1, int param2)
 Get ADC values.
 
char GetAkkuCapacity ()
 Get the current battery level.
 
uint16_t * RamCap ()
 Get pointer to the current battery level.
 
uint16_t * RamLS ()
 Get pointer to the charging state of the battery.
 

Acessories

int GetPeripheryState (int device, int check)
 Get the state of the various peripheries.
 

Bluetooth

int BT_GetLocVisibility (void)
 Get bluetooth visibility.
 
const char * RamBluetoothDeviceName (void)
 Own bluetooth name.
 
char * RamIsBTConnected ()
 Check if bluetooth connected to the another device.
 
char * RamIsBTHeadsetConnected ()
 Check if bluetooth connected to the headset.
 

Events

void * GetMissedEventsPtr (void)
 Get missed events ptr.
 

Other functions

char IsSliderClosed ()
 Get slider position.
 
char * RamIsSimPresent ()
 Check if SIM-card is present.
 
char * RamIsRunCamera ()
 Check if Camera is running.
 
char * RamIsShutdown ()
 Check if phone in shutdown process.
 
char * RamIsStandby ()
 Check if phone in standby mode.
 
char * RamExtendedCameraState ()
 Get a pointer to the camera state.
 
char * RamIsCameraLighterOn ()
 Check if camera lighter is ON.
 
void * RamActiveAppointment ()
 Pointer to the active appointment (organizer)
 
char * RamRingtoneStatus ()
 Pointer to the ringtone sound status.
 
void * RamIsFileCache (void)
 Get the state of the file-operation indicator.
 

Enumeration Type Documentation

◆ PhoneInfoID

Phone info indexes for the Get_Phone_Info.

Enumerator
PI_BASE_INFO1 

Example: ch_x75idbi14.

PI_BASE_INFO2 

Example: m75i14::main_1.0_V79.27.1.

PI_BASE_INFO3 

Example: M_x75plat_MP_main_1.0.

PI_BASE_INFO4 

Example: M_minosemea_TH.

PI_BUILD 

Example: OFFICIAL.

PI_DATETIME1 

Firmware 1-st build time.

PI_DATETIME2 

Firmware 2-nd build time.

PI_SW_NUMBER 

Example: 51.

PI_VENDOR 

Example: SIEMENS.

PI_MODEL 

Example: S75.

PI_LG 

Example: lg01.

PI_T9 

T9.

Definition at line 20 of file info.h.

◆ BatChargingStateID

Battery charging state.

Enumerator
BAT_STATE_DISCHARGING 
BAT_STATE_UNKNOWN 
BAT_STATE_CHARGING 
BAT_STATE_FULLY_CHARGED 

Definition at line 38 of file info.h.

Function Documentation

◆ GetFreeRamAvail()

int GetFreeRamAvail ( )

Get free RAM.

Returns
free RAM in bytes

◆ RamTotalHeapSize()

int * RamTotalHeapSize ( void )

Get total size of the HEAP.

Returns
size

◆ RamTemporaryHeapSize()

int * RamTemporaryHeapSize ( void )

Get total size of the non-perm HEAP.

Returns
size

◆ GetMMIMemUsed()

uint32_t GetMMIMemUsed ( )

Get memory used by MMI.

Returns
used RAM in bytes

◆ Get_Phone_Info()

char * Get_Phone_Info ( int index)

Get basic phone info.

Parameters
indexinfo index, see PhoneInfoID
Returns
string with information

◆ GetCurrentLocale()

char * GetCurrentLocale ( void )

Get the phone's language.

Returns
iso code, example: ru, en

◆ RamDisplayLanguage()

char * RamDisplayLanguage ( )

Get the phone's language.

Returns
pointer to the language ID
int lang_id = *RamDisplayLanguage();
char * RamDisplayLanguage()
Get the phone's language.
Deprecated
Always use GetCurrentLocale

◆ GetAkku()

int GetAkku ( int param1,
int param2 )

Get ADC values.

Examples:

  • GetAkku(1, 3) - Get phone temperature. Convert to celsium: (value - 0xAAA + 15) / 10.
  • GetAkku(0, 9) - Get battery voltage (mV).
Parameters
param1,param2- unknown magic values
Returns
ADC value in mV

◆ GetAkkuCapacity()

char GetAkkuCapacity ( )

Get the current battery level.

Returns
0-100

◆ RamCap()

uint16_t * RamCap ( )

Get pointer to the current battery level.

int capacity = *RamCap(); // 0-100
uint16_t * RamCap()
Get pointer to the current battery level.
Returns
pointer
Deprecated
Always use GetAkkuCapacity

◆ RamLS()

uint16_t * RamLS ( )

Get pointer to the charging state of the battery.

Returns
see BatChargingStateID
int charging_state = *RamLS();
uint16_t * RamLS()
Get pointer to the charging state of the battery.

◆ GetPeripheryState()

int GetPeripheryState ( int device,
int check )

Get the state of the various peripheries.

Parameters
deviceID of the periphery: 4-gprs, 0-BT, 1-irda, 2-COM ?
checkwhich state to check: 4-IsActive, (1|2)-IsOn

◆ BT_GetLocVisibility()

int BT_GetLocVisibility ( void )

Get bluetooth visibility.

Returns
visibility
Available on platforms:
NSG, ELKA

◆ RamBluetoothDeviceName()

const char * RamBluetoothDeviceName ( void )

Own bluetooth name.

Returns
C-string
Note
Only on models with Bluetooth.

◆ RamIsBTConnected()

char * RamIsBTConnected ( )

Check if bluetooth connected to the another device.

Returns
C-string

◆ RamIsBTHeadsetConnected()

char * RamIsBTHeadsetConnected ( )

Check if bluetooth connected to the headset.

Returns
pointer to the low byte of the connection handle in BT link slot 0: 0xFF if no device is connected
Note
Any BT device in link slot 0 is reported, usually the headset.

◆ GetMissedEventsPtr()

void * GetMissedEventsPtr ( void )

Get missed events ptr.

Returns
unknown

◆ IsSliderClosed()

char IsSliderClosed ( )

Get slider position.

Returns
1 if the slider is closed, 0 if it is open, 2 if the position is unknown
Note
Always returns 2 on models without a slider.

◆ RamIsSimPresent()

char * RamIsSimPresent ( )

Check if SIM-card is present.

Returns
pointer to the flag: nonzero while a SIM card is active, 0 if no card answered or the SIM is deactivated
Note
The flag is nonzero during the first activation attempts at startup, until card detection finishes.

◆ RamIsRunCamera()

char * RamIsRunCamera ( )

Check if Camera is running.

Returns
1 or 0

◆ RamIsShutdown()

char * RamIsShutdown ( )

Check if phone in shutdown process.

Returns
pointer to the flag: 1 after the power-off started by holding the end key, 0 otherwise

◆ RamIsStandby()

char * RamIsStandby ( )

Check if phone in standby mode.

Returns
pointer to the flag (1 or 0)
Available on platforms:
X75, SG

◆ RamExtendedCameraState()

char * RamExtendedCameraState ( )

Get a pointer to the camera state.

Returns
state
int camera_state = *RamExtendedCameraState();
char * RamExtendedCameraState()
Get a pointer to the camera state.

◆ RamIsCameraLighterOn()

char * RamIsCameraLighterOn ( )

Check if camera lighter is ON.

Returns
1 or 0

◆ RamActiveAppointment()

void * RamActiveAppointment ( )

Pointer to the active appointment (organizer)

Returns
1 or 0

◆ RamRingtoneStatus()

char * RamRingtoneStatus ( )

Pointer to the ringtone sound status.

Returns
pointer
int sounds_on = *RamRingtoneStatus();
char * RamRingtoneStatus()
Pointer to the ringtone sound status.

◆ RamIsFileCache()

void * RamIsFileCache ( void )

Get the state of the file-operation indicator.

Returns
pointer to firmware-owned indicator state