<!--
GetCbConfig:
@result: Success(0)
+ @3gppType: Type of 3gpp, 0x01 . 3gpp. 0x02 . 3gpp2(CDMA)
@cbEnable: CB service state. If cb_enabled is true then cell broadcast service will be enabled
- @slectedId: CBMI Identifier selected (all or some)
@msgIdMaxCount: CB Channel List Max Count
@msgIdCount: CB message ID count
@msgId: CB message ID information
-->
<method name="GetCbConfig">
<arg direction="out" type="i" name="result"/>
+ <arg direction="out" type="i" name="net3gppType"/>
<arg direction="out" type="i" name="cbEnable"/>
- <arg direction="out" type="i" name="slectedId"/>
<arg direction="out" type="i" name="msgIdMaxCount"/>
- <arg direction="out" type="i" name="msgIdCount"/>
- <arg direction="out" type="s" name="msgId"/>
+ <arg direction="out" type="i" name="msgIdRangeCount"/>
+ <arg direction="out" type="aa{sv}" name="msgId"/>
</method>
<!--
SetCbConfig:
+ @3gppType: Type of 3gpp, 0x01 . 3gpp. 0x02 . 3gpp2(CDMA)
@cbEnable: CB service state. If cb_enabled is true then cell broadcast service will be enabled
- @slectedId: CBMI Identifier selected (all or some)
@msgIdMaxCount: CB Channel List Max Count
@msgIdCount: CB message ID count
@msgId: CB message ID information
Set SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
-->
<method name="SetCbConfig">
+ <arg direction="in" type="i" name="net3gppType"/>
<arg direction="in" type="i" name="cbEnable"/>
- <arg direction="in" type="i" name="slectedId"/>
<arg direction="in" type="i" name="msgIdMaxCount"/>
- <arg direction="in" type="i" name="msgIdCount"/>
+ <arg direction="in" type="i" name="msgIdRangeCount"/>
<arg direction="in" type="s" name="msgId"/>
<arg direction="out" type="i" name="result"/>
</method>
</signal>
<!--
+ IncommingEtwsMsg:
+ @cbMsgType: ETWS message type. PRIMARY, SECONDARY_GSM, SECONDARY_UMTS
+ @msgLength: Size of the array which is actual TPDU message
+ @tpdu: ETWS message data[Refer 3GPP TS 23.041 9.4.1
+
+ This is an unsolicited Incoming cell broadcast message
+ -->
+ <signal name="IncommingEtwsMsg">
+ <arg type="i" name="etwsMsgType"/>
+ <arg type="i" name="msgLength"/>
+ <arg type="s" name="tpdu"/>
+ </signal>
+
+ <!--
MemoryStatus:
@status: SIM memory status.
%define major 0
%define minor 1
-%define patchlevel 49
+%define patchlevel 56
Name: tel-plugin-dbus_tapi
Summary: dbus-tapi plugin for telephony
Version: %{major}.%{minor}.%{patchlevel}
struct custom_data *ctx = user_data;
TelephonyManager *mgr;
- dbg("dbus registered");
+ info("dbus registered");
ctx->manager = g_dbus_object_manager_server_new (MY_DBUS_PATH);
#include "generated-code.h"
#include "common.h"
-#define g_variant_iter_free0( iter ) \
- if ( iter ) \
- g_variant_iter_free( iter );\
- else \
- dbg("iter : 0");
-
-
static gboolean on_sap_connect(TelephonySap *sap, GDBusMethodInvocation *invocation,
gint arg_req_max_size, gpointer user_data)
{
i++;
}
t_apdu.apdu_length = (unsigned int)i;
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
g_variant_unref(inner_gv);
g_variant_unref(arg_req_apdu);
#define SAT_DEF_CMD_Q_MAX 10
#define SAT_TIME_OUT 60000
-#define g_variant_iter_free0( iter ) \
- if ( iter ) \
- g_variant_iter_free( iter );\
- else \
- dbg("iter : 0");
-
-
static unsigned int _get_time_in_ms(struct tel_sat_duration *dr)
{
switch (dr->time_unit) {
tr->terminal_rsp_data.receive_data.channel_data.data_string[index] = data;
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
dbg("the last index data(%d), data_total_len(%d)", index, data_str_len);
}
item_id = data;
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
g_variant_unref(inner_gv);
}
inkey_data[index] = data;
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
g_variant_unref(inner_gv);
inkey_data_len = index;
}
input_data[index] = data;
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
g_variant_unref(inner_gv);
input_data_len = index;
}
input_data[index] = data;
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
g_variant_unref(inner_gv);
input_data_len = index;
}
#include "TelSat.h"
#include "sat_ui_support.h"
-#define g_variant_iter_free0( iter ) \
- if ( iter ) \
- g_variant_iter_free( iter );\
- else \
- dbg("iter : 0");
-
static gboolean _sat_ui_support_processing_setup_menu_ind(GVariant *data)
{
gint rv;
memcpy(setup_menu.satMainMenuItem[index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
}
setup_menu.bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
setup_menu.bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
memcpy(select_item.menuItem[index].text, item_str, TAPI_SAT_ITEM_TEXT_LEN_MAX + 1);
index++;
}
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
}
cmd_type = g_strdup_printf("%d", SAT_PROATV_CMD_SELECT_ITEM);
#include "generated-code.h"
#include "common.h"
-#define g_variant_iter_free0( iter ) \
- if ( iter ) \
- g_variant_iter_free( iter );\
- else \
- dbg("iter : 0");
static gboolean dbus_sim_data_request(struct custom_data *ctx, enum tel_sim_status sim_status )
{
i++;
}
send_apdu.apdu_length = (unsigned int)i;
- g_variant_iter_free0(iter);
+ g_variant_iter_free(iter);
g_variant_unref(inner_gv);
g_variant_unref(arg_apdu);
on_sms_get_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
gpointer user_data)
{
- struct treq_sms_get_cb_config getCbConfig;
+ struct treq_sms_get_cb_config getCbConfig;
struct custom_data *ctx = user_data;
UserRequest *ur = NULL;
static gboolean
on_sms_set_cb_config(TelephonySms *sms, GDBusMethodInvocation *invocation,
+ gint arg_net3gppType,
gboolean arg_cbEnable,
- gint arg_slectedId,
gint arg_msgIdMaxCount,
- gint arg_msgIdCount,
+ gint arg_msgIdRangeCount,
const gchar *arg_msgId,
gpointer user_data)
{
- struct treq_sms_set_cb_config setCbConfig = {0,};
+ struct treq_sms_set_cb_config setCbConfig = {0,};
struct custom_data *ctx = user_data;
UserRequest *ur = NULL;
gsize length;
guchar *decoded_msgId = NULL;
- setCbConfig.bCBEnabled = arg_cbEnable;
- setCbConfig.selectedId = arg_slectedId;
+ setCbConfig.net3gppType = arg_net3gppType;
+ setCbConfig.cbEnabled = arg_cbEnable;
setCbConfig.msgIdMaxCount = arg_msgIdMaxCount;
- setCbConfig.msgIdCount = arg_msgIdCount;
+ setCbConfig.msgIdRangeCount = arg_msgIdRangeCount;
decoded_msgId = g_base64_decode(arg_msgId, &length);
- memcpy(&(setCbConfig.msgIDs[0]), decoded_msgId, SMS_GSM_SMS_CBMI_LIST_SIZE_MAX);
+ memcpy(&(setCbConfig.msgIDs[0]), decoded_msgId, SMS_GSM_SMS_CBMI_LIST_SIZE_MAX*5);
ur = MAKE_UR(ctx, sms, invocation);
tcore_user_request_set_data(ur, sizeof(struct treq_sms_set_cb_config), &setCbConfig);
CoreObject *co_sms;
char *modem_name = NULL;
TcorePlugin *p = NULL;
+ int i;
modem_name = tcore_user_request_get_modem_name(ur);
if (!modem_name)
case TRESP_SMS_GET_CB_CONFIG: {
const struct tresp_sms_get_cb_config *resp = data;
- gchar *msgIDs = NULL;
+ GVariant *result = NULL;
+ GVariantBuilder b;
dbg("receive TRESP_SMS_GET_CB_CONFIG");
dbg("resp->result = 0x%x", resp->result);
- msgIDs = g_base64_encode((const guchar *)&(resp->cbConfig.msgIDs[0]), SMS_GSM_SMS_CBMI_LIST_SIZE_MAX);
- if (msgIDs == NULL) {
- dbg("g_base64_encode: Failed to Enocde cbConfig.msgIDs");
- msgIDs = "";
+ g_variant_builder_init(&b, G_VARIANT_TYPE("aa{sv}"));
+
+ for (i = 0; i < resp->cbConfig.msgIdRangeCount; i++) {
+ g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+
+ if( resp->cbConfig.net3gppType == SMS_NETTYPE_3GPP ) {
+ g_variant_builder_add(&b, "{sv}", "FromMsgId", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.fromMsgId));
+ g_variant_builder_add(&b, "{sv}", "ToMsgId", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp.toMsgId));
+ } else if( resp->cbConfig.net3gppType == SMS_NETTYPE_3GPP2) {
+ g_variant_builder_add(&b, "{sv}", "CBCategory", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbCategory));
+ g_variant_builder_add(&b, "{sv}", "CBLanguage", g_variant_new_uint16(resp->cbConfig.msgIDs[i].net3gpp2.cbLanguage));
+ } else {
+ dbg("Unknown 3gpp type");
+ return FALSE;
+ }
+
+ g_variant_builder_add(&b, "{sv}", "Selected", g_variant_new_byte(resp->cbConfig.msgIDs[i].net3gpp.selected));
+
+ g_variant_builder_close(&b);
}
+ result = g_variant_builder_end(&b);
+
telephony_sms_complete_get_cb_config(dbus_info->interface_object, dbus_info->invocation,
resp->result,
- resp->cbConfig.bCBEnabled,
- resp->cbConfig.selectedId,
+ resp->cbConfig.net3gppType,
+ resp->cbConfig.cbEnabled,
resp->cbConfig.msgIdMaxCount,
- resp->cbConfig.msgIdCount,
- msgIDs);
-
- if(msgIDs)
- g_free(msgIDs);
-
+ resp->cbConfig.msgIdRangeCount,
+ result);
}
break;
}
break;
+ case TNOTI_SMS_ETWS_INCOM_MSG: {
+ const struct tnoti_sms_etws_msg *noti = data;
+ gchar *msgData = NULL;
+
+ msgData = g_base64_encode((const guchar *)&(noti->etwsMsg.msgData[0]), SMS_SMSP_ADDRESS_LEN);
+ if (msgData == NULL) {
+ dbg("g_base64_encode: Failed to Enocde etwsMsg.msgData");
+ msgData = "";
+ }
+
+ telephony_sms_emit_incomming_etws_msg(sms,
+ noti->etwsMsg.etwsMsgType,
+ noti->etwsMsg.length,
+ msgData);
+
+ if(msgData)
+ g_free(msgData);
+ }
+ break;
+
case TNOTI_SMS_INCOM_EX_MSG: {
#if 0
noti->cdmaMsg.ParamMask), SIPC_MARSHAL_DATA_INT_TYPE);