} else {
snprintf(out.data, out.len, "%s", SDBD_CAP_RET_DISABLED);
}
+ ret = SDBD_PLUGIN_RET_SUCCESS;
+ } else if (SDBD_CMP_CAP(in_buf, CANLAUNCH)) {
+ snprintf(out.data, out.len, "%s", UNKNOWN);
+ ret = SDBD_PLUGIN_RET_SUCCESS;
} else if (SDBD_CMP_CAP(in_buf, PLUGIN_VER)) {
snprintf(out.data, out.len, "%s", UNKNOWN);
ret = SDBD_PLUGIN_RET_SUCCESS;
}
+ // Target name of the launch possible
+ if(!request_plugin_cmd(SDBD_CMD_PLUGIN_CAP, SDBD_CAP_TYPE_CANLAUNCH,
+ g_capabilities.can_launch,
+ sizeof(g_capabilities.can_launch))) {
+ D("failed to request. (%s:%s) \n", SDBD_CMD_PLUGIN_CAP, SDBD_CAP_TYPE_CANLAUNCH);
+ snprintf(g_capabilities.can_launch, sizeof(g_capabilities.can_launch),
+ "%s", UNKNOWN);
+ }
+
+
// Platform version
ret = system_info_get_platform_string("http://tizen.org/feature/platform.version", &value);
if (ret != SYSTEM_INFO_ERROR_NONE) {
"%s", UNKNOWN);
}
+
// sdbd log enable
if(!request_plugin_cmd(SDBD_CMD_PLUGIN_CAP, SDBD_CAP_TYPE_LOG_ENABLE,
g_capabilities.log_enable,
D("failed to request. (%s:%s) \n", SDBD_CMD_PLUGIN_CAP, SDBD_CAP_TYPE_LOG_ENABLE);
snprintf(g_capabilities.log_enable, sizeof(g_capabilities.log_enable),
"%s", DISABLED);
- }
+ }
- // sdbd log path
+ // sdbd log path
if(!request_plugin_cmd(SDBD_CMD_PLUGIN_CAP, SDBD_CAP_TYPE_LOG_PATH,
g_capabilities.log_path,
sizeof(g_capabilities.log_path))) {
D("failed to request. (%s:%s) \n", SDBD_CMD_PLUGIN_CAP, SDBD_CAP_TYPE_LOG_PATH);
snprintf(g_capabilities.log_path, sizeof(g_capabilities.log_path),
"%s", UNKNOWN);
- }
+ }
+
+
+ // Capability version
+ snprintf(g_capabilities.sdbd_cap_version, sizeof(g_capabilities.sdbd_cap_version),
+ "%d.%d", SDBD_CAP_VERSION_MAJOR, SDBD_CAP_VERSION_MINOR);
}
static int is_support_usbproto()
#define CAPBUF_ITEMSIZE 32
#define CAPBUF_L_ITEMSIZE 256
#define CAPBUF_LL_ITEMSIZE PATH_MAX
+#define SDBD_CAP_VERSION_MAJOR 1
+#define SDBD_CAP_VERSION_MINOR 0
typedef struct platform_capabilities
{
char secure_protocol[CAPBUF_ITEMSIZE]; // enabled or disabled
char profile_name[CAPBUF_ITEMSIZE]; // profile name (ex. mobile)
char vendor_name[CAPBUF_ITEMSIZE]; // vendor name (ex. Tizen)
char sdk_toolpath[CAPBUF_L_ITEMSIZE]; // sdk tool path
+ char can_launch[CAPBUF_L_ITEMSIZE]; // target name
char platform_version[CAPBUF_ITEMSIZE]; // platform version (ex. 2.3.0)
char product_version[CAPBUF_ITEMSIZE]; // product version (ex. 1.0)
char sdbd_version[CAPBUF_ITEMSIZE]; // sdbd version
char sdbd_plugin_version[CAPBUF_ITEMSIZE]; // sdbd plugin version
+ char sdbd_cap_version[CAPBUF_ITEMSIZE]; // capability version
} pcap;
pcap g_capabilities;
#define SDBD_CAP_TYPE_USBPROTO "usb_protocol_support"
#define SDBD_CAP_TYPE_SOCKPROTO "socket_protocol_support"
#define SDBD_CAP_TYPE_ROOTONOFF "root_onoff_support"
+#define SDBD_CAP_TYPE_CANLAUNCH "can_launch_target"
#define SDBD_CAP_TYPE_PLUGIN_VER "sdbd_plugin_version"
#define SDBD_CAP_TYPE_PRODUCT_VER "product_version"
#define SDBD_CAP_TYPE_LOG_ENABLE "sdbd_log_enable"
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"sockproto_support", g_capabilities.sockproto_support);
+ // Window size synchronization support
+ offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
+ "syncwinsz_support", g_capabilities.syncwinsz_support);
+
// Root command support
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"rootonoff_support", g_capabilities.rootonoff_support);
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"vendor_name", g_capabilities.vendor_name);
+ // Target name of the launch possible
+ offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
+ "can_launch", g_capabilities.can_launch);
+
// Platform version
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"platform_version", g_capabilities.platform_version);
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"sdbd_plugin_version", g_capabilities.sdbd_plugin_version);
- // Window size synchronization support
+ // Capability version
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
- "syncwinsz_support", g_capabilities.syncwinsz_support);
+ "sdbd_cap_version", g_capabilities.sdbd_cap_version);
// Sdbd log enable
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,