tizen 2.3.1 release
[framework/telephony/tel-plugin-dbus_tapi.git] / src / sat_manager.h
index 54620c7..7fb1d36 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * tel-plugin-dbus-tapi
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef SAT_MANAGER_H_
 #define SAT_MANAGER_H_
 
@@ -28,6 +48,7 @@ typedef union {
        struct tel_sat_receive_channel_tlv receive_data;
        struct tel_sat_send_channel_tlv send_data;
        struct tel_sat_get_channel_status_tlv get_channel_status;
+       struct tel_sat_unsupproted_command_tlv unsupport_cmd;
 } sat_manager_proactive_data;
 
 /**
@@ -37,32 +58,37 @@ struct sat_manager_queue_data {
        enum tel_sat_proactive_cmd_type cmd_type; /**<Type of Command*/
        int cmd_id; /**<Command Id*/
        sat_manager_proactive_data cmd_data; /**<Proactive Cmd Ind Info*/
+       gboolean noti_required; /* for missing SESSION END noti*/
+       char *cp_name; /**<cp_name*/
 };
 
 
 /*================================================================================================*/
 
-void sat_manager_init_queue(struct custom_data *ctx);
+// queue handling
+void sat_manager_init_queue(struct custom_data *ctx, const char *cp_name);
+gboolean sat_manager_remove_cmd_by_id(struct custom_data *ctx, int cmd_id);
 
 //application request handling
 gboolean sat_manager_handle_user_confirm(struct custom_data *ctx, TcorePlugin *plg, GVariant *user_confirm_data);
 gboolean sat_manager_handle_app_exec_result(struct custom_data *ctx, TcorePlugin *plg, gint command_id, gint command_type, GVariant *exec_result);
 gboolean sat_manager_handle_ui_display_status(struct custom_data *ctx, TcorePlugin *plg, gint command_id, gboolean display_status);
 gboolean sat_manager_handle_event_download_envelop(int event_type, int src_dev, int dest_dev, struct tel_sat_envelop_event_download_tlv *evt_download, GVariant *download_data);
+gboolean sat_manager_update_language(struct custom_data *ctx, const char *plugin_name, GVariant *language_noti);
 
 //proactive command processing
 GVariant* sat_manager_caching_setup_menu_info(struct custom_data *ctx, const char *plugin_name, struct tel_sat_setup_menu_tlv* setup_menu_tlv);
-GVariant* sat_manager_display_text_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_display_text_tlv* display_text_tlv);
+GVariant* sat_manager_display_text_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_display_text_tlv* display_text_tlv, int decode_error);
 GVariant* sat_manager_select_item_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_select_item_tlv* select_item_tlv);
-GVariant* sat_manager_get_inkey_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_get_inkey_tlv* get_inkey_tlv);
-GVariant* sat_manager_get_input_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_get_input_tlv* get_input_tlv);
+GVariant* sat_manager_get_inkey_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_get_inkey_tlv* get_inkey_tlv, int decode_error);
+GVariant* sat_manager_get_input_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_get_input_tlv* get_input_tlv, int decode_error);
 GVariant* sat_manager_play_tone_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_play_tone_tlv* play_tone_tlv);
 GVariant* sat_manager_send_sms_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_send_sms_tlv* send_sms_tlv);
 GVariant* sat_manager_send_ss_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_send_ss_tlv* send_ss_tlv);
 GVariant* sat_manager_send_ussd_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_send_ussd_tlv* send_ussd_tlv);
 GVariant* sat_manager_setup_call_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_setup_call_tlv* setup_call_tlv);
 GVariant* sat_manager_setup_event_list_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_setup_event_list_tlv *event_list_tlv);
-GVariant* sat_manager_setup_idle_mode_text_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_setup_idle_mode_text_tlv *idle_mode_tlv);
+GVariant* sat_manager_setup_idle_mode_text_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_setup_idle_mode_text_tlv *idle_mode_tlv, int decode_error);
 GVariant* sat_manager_open_channel_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_open_channel_tlv *open_channel_tlv);
 GVariant* sat_manager_close_channel_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_close_channel_tlv *close_channel_tlv);
 GVariant* sat_manager_receive_data_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_receive_channel_tlv *receive_data_tlv);
@@ -74,10 +100,7 @@ GVariant* sat_manager_send_dtmf_noti(struct custom_data *ctx, const char *plugin
 GVariant* sat_manager_launch_browser_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_launch_browser_tlv *launch_browser_tlv);
 GVariant* sat_manager_provide_local_info_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_provide_local_info_tlv *provide_local_info_tlv);
 GVariant* sat_manager_language_notification_noti(struct custom_data *ctx, const char *plugin_name, struct tel_sat_language_notification_tlv *language_notification_tlv);
-
-void sat_mgr_convert_utf8_to_gsm(unsigned char *dest, int *dest_len, unsigned char* src, unsigned int src_len);
-void sat_mgr_convert_utf8_to_ucs2(unsigned char* dest, int* dest_len,  unsigned char* src, int src_len);
-void sat_mgr_convert_string(unsigned char *dest, unsigned short *dest_len,
-               enum alphabet_format dcs, unsigned char *src, unsigned short src_len);
+gboolean sat_manager_processing_unsupport_proactive_command(struct custom_data *ctx, const char *plugin_name, struct tel_sat_unsupproted_command_tlv *unsupport_tlv);
+gboolean sat_manager_handle_sat_ui_launch_fail(struct custom_data *ctx, const char *plugin_name, struct tnoti_sat_proactive_ind *p_ind);
 
 #endif /* SAT_MANAGER_H_ */