Application structure
The basic actions are related to application life cycle - they are invoked when e.g. the application is loaded into memory, when there is time for the application to initialize itself or when the application is unloaded from memory and should clean up resources it used.
Application lifecycle
Registerable actions but not by reg_action():
Registerable actions registered by reg_action():
These actions should be registered always during initalization (ACTION_APP_INIT) or on demand and can be unregistered by unreg_action(). If *_EVENT_* action is set up ad hoc you have to call the set_up_event_list() call to inform ME to update the event list.
|
Invoked for application to initialize its internals.
|
|
Invoked for application registration. Called only once when the application is loaded into the memory. By registration we mean one time process, when application can e.g. allocate EEPROM structures, reg_sms_tag(), reg_file_type() etc. |
|
Invoked when application is unloaded from memory. Application should clear the resources it used (EEPROM). |
|
Invoked when ME updates EF_BCCH |
|
ENVELOPE CALL CONTROL, Ref. 11.14 |
|
ENVELOPE Browser Termination Event, Ref. 11.14 |
|
ENVELOPE Call Connected Event, Ref. 11.14 |
|
ENVELOPE Call Disconnected Event, Ref. 11.14 |
|
ENVELOPE Card Reader Status Event, Ref. 11.14 |
|
ENVELOPE Channel Status Event, Ref. 11.14 |
|
ENVELOPE Data Available Event, Ref. 11.14 |
|
ENVELOPE Idle Screen Available Event, Ref. 11.14 |
|
ENVELOPE Language Selection Event, Ref. 11.14 |
|
ENVELOPE Location Status Event, Ref. 11.14 |
|
ENVELOPE MT Call Event, Ref. 11.14 |
|
ENVELOPE User Activity Event, Ref. 11.14 |
|
Invoked when ME requests file registered by the reg_file() call.
u8 PROGMEM fake_file_path[]= { 0x3F, 0x00, 0x7F, 0x20, 0x6F, 0x07 }; void handle_fake_file(File_apdu_data *fa) { } void turbo_handler(u8 action, void * data) { switch(action) { ... case ACTION_APP_INIT: reg_file(fake_file_path,3); break; case ACTION_FILE_APDU: handle_fake_file(data); break; ... } |
|
Invoked upon start up when ME is ready to handle STK commands, after menu is set. |
|
Register this action if you want turbo (your application) to operate also between APDUs. Following should be considered when using idle task:
|
|
Request for application to insert its menu items. Application may insert more than one item by insert_menu(). This action is invoked whenever either SIM or turbo wants to set up new menu list. It can happen ad hoc, e.g. user loads new application or changes language, etc. |
|
Invoked when ME updates EF_LOCI |
|
Invoked when menu item was selected by the user. The application can have more than one item in top level menu inserted (max. 4). Example: lc_char PROGMEM lc_Item_A[]={ LC_EN("Item A") LC_END }; lc_char PROGMEM lc_Item_B[]={ LC_EN("Item B") LC_END }; void action_menu(Menu_selection_data * x) { if(x->item==0) { // Item A } else //x==1 { // Item B } } void turbo_handler(u8 action, void * data) { switch(action) { ... case ACTION_INSERT_MENU: insert_menu(locale(lc_Item_A)); insert_menu(locale(lc_Item_B)); break; case ACTION_MENU_SELECTION: stk_thread(action_menu, data); break; ... } } |
|
ENVELOPE MO SMS CONTROL, Ref. 11.14 |
|
Invoked when ME asks SIM APDU RUN GSM ALGORITHM. |
|
Invoked when SMS is received.
|
|
Invoked when answer Turbo SMS of registered SMS_TYPE_QA type is received. |
|
ENVELOPE CELL BROADCAST DOWNLOAD, Ref. 11.14 |
|
Invoked when message Turbo SMS of registered SMS_TYPE_MSG type is received. |
|
ENVELOPE SMS-PP DOWNLOAD, Ref. 11.14 |
|
Invoked when question Turbo SMS of registered SMS_TYPE_QA type is received. |
|
Invoked by ME APDU STATUS command. Usually every 30sec in idle. |
|
Invoked when ME sends GSM_TERMINAL_PROFILE cmd. Since then the return value of terminal_profile() is valid. |
|
Invoked when ME signals EVENT that timer has expired. |
|
Structure passed with ACTION_FILE_APDU action to application. |
|
Structure passed with ACTION_MENU_SELECTION action to application. inserted with insert_menu() (max. 4 items can be inserted by one application). |
|
Turbo handler type definition. |
|
Register action.
|
|
Spawn new SIM Toolkit thread. The new thread applies the function start_routine passing it arg as first argument.
|
|
Unregister action.
|
|
Wait for ACTION and display alpha text meanwhile. If alpha text is NULL more_time() is used and no text is displayed. The number of repeatings says how many times display_text() or more_time() is fetched.
|
Copyright © 2004-2006 BLADOX | Turbo version 1.2
|