API KMS & GTK callback handler part. More...
#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <string.h>#include <stdio.h>#include <gtk/gtk.h>#include <gtk/gtkmain.h>#include "vos.h"#include "support.h"#include "app_main.h"#include "expat.h"#include "net_remote.h"#include "net_local.h"#include "app_api.h"#include "app_itf.h"
Functions | |
| vos_res_t | app_cb_connect_ind (bool in_b_is_mmi_system, bool in_b_connected_to_local, bool in_b_connected) |
| This callback indicates the application is connected or not to the Knet Agent (start point to performs M2M requests). | |
| vos_res_t | app_cb_ind_position (char *in_pc_date, u32 in_u32_fix, s32 in_s32_lat, s32 in_s32_long, s32 in_s32_alt, u32 in_u32_course, u32 in_u32_speed, u32 in_u32_nsat, u32 in_u32_hdop) |
| KMS position message received. | |
| vos_res_t | app_cb_ind_areatrig (char *in_pc_date, u32 in_u32_id, s32 in_s32_lat, s32 in_s32_long, u32 in_u32_course, u32 in_u32_speed, u32 in_u32_radius, area_way_e in_e_way) |
| KMS areatrig message received. | |
| vos_res_t | app_cb_ind_sms (char *in_pc_ident, report_e in_e_report) |
| KMS SMS message received. | |
| vos_res_t | app_cb_ind_smstrig (char *in_pc_ident, char *in_pc_msg) |
| KMS SMSTRIG message received. | |
| vos_res_t | app_cb_ind_calltrig (char *in_pc_status, char *in_pc_ident, char *in_pc_date) |
| KMS CALLTRIG message received. | |
| vos_res_t | app_cb_ind_gsmtrig (report_e in_e_network) |
| KMS GSMTRIG message received. | |
| vos_res_t | app_cb_ind_rssi (u32 in_u32_value) |
| KMS RSSI message received. | |
| vos_res_t | app_cb_ind_input (bool in_b_is_mmi_system, io_type_e in_e_type, u32 in_u32_id, u32 in_u32_value) |
| KMS INPUT message received. | |
| vos_res_t | app_cb_ind_inputtrig (bool in_b_is_mmi_system, io_type_e in_e_type, u32 in_u32_id, u32 in_u32_value, io_way_e in_e_way) |
| KMS INPUTTRIG message received. | |
| vos_res_t | app_cb_ind_stats (bearer_class_e in_e_class, char *in_pc_status, char *in_pc_start, char *in_pc_stop, u32 in_u32_tx, u32 in_u32_rx) |
| KMS STATS meassage received. | |
| vos_res_t | app_cb_ind_statstrig (bearer_class_e in_e_class, char *in_pc_status, char *in_pc_start, char *in_pc_stop, u32 in_u32_tx, u32 in_u32_rx) |
| KMS STATS meassage received. | |
| vos_res_t | app_cb_ind_stats_system (u32 in_u32_flash, u32 in_u32_ram, u32 in_u32_cpu) |
| KMS STATS meassage received. | |
| vos_res_t | app_cb_ind_version (char *in_pc_revision) |
| KMS VERSION message received. | |
| vos_res_t | app_cb_ind_system (bool in_b_is_mmi_system, bool in_b_is_local_agent, system_act_e in_e_act, bearer_class_e in_e_class, report_e in_e_report) |
| KMS SYSTEM message received. | |
| vos_res_t | app_cb_ind_dota (char *in_pc_report) |
| KMS DOTA message received. | |
| vos_res_t | app_cb_ind_stopreq (char *in_pc_cause) |
| KMS STOPREQ message received. | |
| gboolean | ping_knetd () |
| This function is call regularly by gtk_main() to say to local agent "I'm still alive!". | |
| gboolean | refresh_text () |
| This function is call regularly by gtk_main() to refresh display. | |
| void | on_decrement_pressed (GtkButton *button, gpointer user_data) |
| Called when 'volume increase' or 'backlight increase' buttons are pressed. | |
| void | on_increment_pressed (GtkButton *button, gpointer user_data) |
| Called when 'volume decrease' or 'backlight decrease' buttons are pressed. | |
| void | on_increment_or_decrement_released (GtkButton *button, gpointer user_data) |
| Called whent 'volumes' or 'backlights' buttons are released. | |
| void | on_button_connect_clicked (GtkButton *button, gpointer user_data) |
| Called when 'connect' button is pressed. | |
API KMS & GTK callback handler part.
This file contains all callback handlers called by KMS RX interface and called by GTK widgets.
| vos_res_t app_cb_connect_ind | ( | bool | in_b_is_mmi_system, | |
| bool | in_b_connected_to_local, | |||
| bool | in_b_connected | |||
| ) |
This callback indicates the application is connected or not to the Knet Agent (start point to performs M2M requests).
| in_b_is_mmi_system | TRUE if MMI, else FALSE. | |
| in_b_connected_to_local | TRUE if connected, else FALSE. | |
| in_b_connected | inform if link is ok/ko with Knet agent. |

| vos_res_t app_cb_ind_areatrig | ( | char * | in_pc_date, | |
| u32 | in_u32_id, | |||
| s32 | in_s32_lat, | |||
| s32 | in_s32_long, | |||
| u32 | in_u32_course, | |||
| u32 | in_u32_speed, | |||
| u32 | in_u32_radius, | |||
| area_way_e | in_e_way | |||
| ) |
KMS areatrig message received.
| in_pc_date | is the date of the areatrig | |
| in_u32_id | is the id of the area | |
| in_s32_lat | is the latitude in 1/100000 degrees | |
| in_s32_long | is the longitude in 1/100000 degrees | |
| in_u32_course | is the course in degrees | |
| in_u32_speed | is the speed in km/h | |
| in_u32_radius | is the radius of the area | |
| in_e_way | is the in/out detection mode |
| vos_res_t app_cb_ind_calltrig | ( | char * | in_pc_status, | |
| char * | in_pc_ident, | |||
| char * | in_pc_date | |||
| ) |
KMS CALLTRIG message received.
| in_pc_status | gives the status af the GSM state | |
| in_pc_ident | gives the phone number of the shipper | |
| in_pc_date | provides the date of call |
| vos_res_t app_cb_ind_dota | ( | char * | in_pc_report | ) |
KMS DOTA message received.
| in_pc_report | is the dota status. |
| vos_res_t app_cb_ind_gsmtrig | ( | report_e | in_e_network | ) |
KMS GSMTRIG message received.
| in_e_network | gives the status of GSM network |
| vos_res_t app_cb_ind_input | ( | bool | in_b_is_mmi_system, | |
| io_type_e | in_e_type, | |||
| u32 | in_u32_id, | |||
| u32 | in_u32_value | |||
| ) |
KMS INPUT message received.
| in_b_is_mmi_system | TRUE if MMI, else FALSE. | |
| in_e_type | gives the type of the I/O (digital, adc, apc, temperature) | |
| in_u32_id | gives the num id of the I/O | |
| in_u32_value | gives the value read. |

| vos_res_t app_cb_ind_inputtrig | ( | bool | in_b_is_mmi_system, | |
| io_type_e | in_e_type, | |||
| u32 | in_u32_id, | |||
| u32 | in_u32_value, | |||
| io_way_e | in_e_way | |||
| ) |
KMS INPUTTRIG message received.
| in_b_is_mmi_system | TRUE if MMI, else FALSE. | |
| in_e_type | gives the type of the I/O (digital, adc, apc, temperature). | |
| in_u32_id | gives the num id of the I/O. | |
| in_u32_value | gives the value read. | |
| in_e_way | is the threshold passing/edge mode. |

| vos_res_t app_cb_ind_position | ( | char * | in_pc_date, | |
| u32 | in_u32_fix, | |||
| s32 | in_s32_lat, | |||
| s32 | in_s32_long, | |||
| s32 | in_s32_alt, | |||
| u32 | in_u32_course, | |||
| u32 | in_u32_speed, | |||
| u32 | in_u32_nsat, | |||
| u32 | in_u32_hdop | |||
| ) |
KMS position message received.
| in_pc_date | is the date of the position | |
| in_u32_fix | is the fix status of the position | |
| in_s32_lat | is the latitude in 1/100000 degrees | |
| in_s32_long | is the longitude in 1/100000 degrees | |
| in_s32_alt | is the altitude in meters | |
| in_u32_course | is the course in degrees | |
| in_u32_speed | is the speed in km/h | |
| in_u32_nsat | is the number of satelites | |
| in_u32_hdop | is the horizontale dilution |
| vos_res_t app_cb_ind_rssi | ( | u32 | in_u32_value | ) |
KMS RSSI message received.
| in_u32_value | is the RSSI value |
| vos_res_t app_cb_ind_sms | ( | char * | in_pc_ident, | |
| report_e | in_e_report | |||
| ) |
KMS SMS message received.
| in_pc_ident | gives the phone number of the destination | |
| in_e_report | contains the result : OK or KO |
| vos_res_t app_cb_ind_smstrig | ( | char * | in_pc_ident, | |
| char * | in_pc_msg | |||
| ) |
KMS SMSTRIG message received.
| in_pc_ident | gives the phone number of the shipper | |
| in_pc_msg | provides the SMS body in text format |
| vos_res_t app_cb_ind_stats | ( | bearer_class_e | in_e_class, | |
| char * | in_pc_status, | |||
| char * | in_pc_start, | |||
| char * | in_pc_stop, | |||
| u32 | in_u32_tx, | |||
| u32 | in_u32_rx | |||
| ) |
KMS STATS meassage received.
| in_e_class | class of the bearer. | |
| in_pc_status | current wanesy link status. | |
| in_pc_start | start date of the connexion. | |
| in_pc_stop | stop date of the connexion. | |
| in_u32_tx | transmitted bytes. | |
| in_u32_rx | received bytes. |
| vos_res_t app_cb_ind_stats_system | ( | u32 | in_u32_flash, | |
| u32 | in_u32_ram, | |||
| u32 | in_u32_cpu | |||
| ) |
KMS STATS meassage received.
| in_u32_flash | provides percentage of used flash. | |
| in_u32_ram | provides percentage of used ram. | |
| in_u32_cpu | provides percentage of used cpu. |
| vos_res_t app_cb_ind_statstrig | ( | bearer_class_e | in_e_class, | |
| char * | in_pc_status, | |||
| char * | in_pc_start, | |||
| char * | in_pc_stop, | |||
| u32 | in_u32_tx, | |||
| u32 | in_u32_rx | |||
| ) |
KMS STATS meassage received.
| in_e_class | class of the bearer. | |
| in_pc_status | current wanesy link status. | |
| in_pc_start | start date of the connexion. | |
| in_pc_stop | stop date of the connexion. | |
| in_u32_tx | transmitted bytes. | |
| in_u32_rx | received bytes. |
| vos_res_t app_cb_ind_stopreq | ( | char * | in_pc_cause | ) |
KMS STOPREQ message received.
| in_pc_cause | is the cause of the request (poweroff, reboot...) |

| vos_res_t app_cb_ind_system | ( | bool | in_b_is_mmi_system, | |
| bool | in_b_is_local_agent, | |||
| system_act_e | in_e_act, | |||
| bearer_class_e | in_e_class, | |||
| report_e | in_e_report | |||
| ) |
KMS SYSTEM message received.
| in_b_is_mmi_system | TRUE if MMI, else FALSE. | |
| in_b_is_local_agent | is a flag to know is we receive msg from local or remote knetd. | |
| in_e_act | specify the kind of command (disconnect, handover, reboot, reload). | |
| in_e_class | (mandatory) specify the class of new bearer. | |
| in_e_report | report for the handover. |

| vos_res_t app_cb_ind_version | ( | char * | in_pc_revision | ) |
KMS VERSION message received.
| in_pc_revision | provides the current version of the KNET agent. |
| void on_button_connect_clicked | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Called when 'connect' button is pressed.
| button | is the GtkButton's pointer. | |
| user_data | is normally empty for this function. |
Referenced by create_window1().

| void on_decrement_pressed | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Called when 'volume increase' or 'backlight increase' buttons are pressed.
| button | is GtkButton's pointer for backlight and volume buttons. | |
| user_data | is a pointer on ui_volume or ui_backlight. |
Referenced by create_window1().
| void on_increment_or_decrement_released | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Called whent 'volumes' or 'backlights' buttons are released.
| button | is GtkButton's pointer for backlight and volume buttons. | |
| user_data | is a pointer on ui_volume or ui_backlight. |
Referenced by create_window1().
| void on_increment_pressed | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) |
Called when 'volume decrease' or 'backlight decrease' buttons are pressed.
| button | is GtkButton's pointer for backlight and volume buttons. | |
| user_data | is a pointer on ui_volume or ui_backlight. |
Referenced by create_window1().
1.7.1