#define SETTING_MMC_ENCRYPTION_UG "setting-mmc-encryption-efl"
#define EXTENDED_SD_APPNAME "org.tizen.extended-sd"
+#define ODE_APPNAME "org.tizen.ode"
#define SDCARD_KEY "_SDCARD_NUM_"
+#define VIEWTYPE_KEY "viewtype"
+#define DEVPATH_KEY "dev_path"
+#define MAPPINGNODE_KEY "mapping_node"
#define DD_BUS_NAME "org.tizen.system.deviced"
#define DD_OBJECT_PATH_ODE "/Org/Tizen/System/DeviceD/Ode"
enum ext_app {
EXT_SETTING_MMC_UG,
- EXT_SD_SETTING
+ EXT_SD_SETTING,
+ EXT_ODE
};
static const struct popup_ops mount_error_ops;
static const struct popup_ops ode_encrypt_ops;
static const struct popup_ops ode_decrypt_ops;
static const struct popup_ops sdcard_setup_ops;
+static const struct popup_ops unlock_extendedsd_ops;
+
static char *Sdcard_ID = NULL;
+static char *View_Type = NULL;
+static char *Dev_Path = NULL;
+static char *Mapping_Node = NULL;
static void remove_other_mmc_popups(const struct popup_ops *ops)
{
else if (type == EXT_SD_SETTING) {
app_control_add_extra_data(app_control, SDCARD_KEY, Sdcard_ID);
ret = app_control_set_app_id(app_control, EXTENDED_SD_APPNAME);
+ } else if (type == EXT_ODE) {
+ app_control_add_extra_data(app_control, VIEWTYPE_KEY, View_Type);
+ app_control_add_extra_data(app_control, DEVPATH_KEY, Dev_Path);
+ app_control_add_extra_data(app_control, MAPPINGNODE_KEY, Mapping_Node);
+ ret = app_control_set_app_id(app_control, ODE_APPNAME);
} else {
_E("No matched type(%d)", type);
return;
terminate_if_no_popup();
}
+static int launch_ode(bundle *b, const struct popup_ops *ops)
+{
+ if (!b || !ops)
+ return -EINVAL;
+
+ View_Type = (char *)bundle_get_val(b, VIEWTYPE_KEY);
+ Dev_Path = (char *)bundle_get_val(b, DEVPATH_KEY);
+ Mapping_Node = (char *)bundle_get_val(b, MAPPINGNODE_KEY);
+
+ if (!View_Type || !Dev_Path || !Mapping_Node) {
+ _E("Failed to get data for ode");
+ return -ENOENT;
+ }
+
+ launch_app(EXT_ODE);
+ return 0;
+}
+
static int sdcard_setup_get_content(const struct popup_ops *ops, char *content, unsigned int len)
{
int ret;
Sdcard_ID = (char *)bundle_get_val(obj->b, SDCARD_KEY);
if (!Sdcard_ID) {
- _E("Failed to get SDCARD ID(%s)");
+ _E("Failed to get SDCARD ID");
return -ENOENT;
}
.pre = launch_mmc_popup,
};
+static const struct popup_ops unlock_extendedsd_ops = {
+ .name = "unlockextendedsd",
+ .show = launch_ode,
+};
+
/* Constructor to register mmc popup */
static __attribute__ ((constructor)) void register_mmc_popup(void)
{
register_popup(&ode_encrypt_ops);
register_popup(&ode_decrypt_ops);
register_popup(&sdcard_setup_ops);
+ register_popup(&unlock_extendedsd_ops);
}