}
__check_pre_context(broker);
+ frame_context_set_inst_id(broker->context, inst_id);
+ frame_context_set_pid(broker->context, pid);
frame_context_get_pid(broker->context, &ctx_pid);
frame_context_get_serial(broker->context, &ctx_serial);
&serial);
}
- if (inst_id && pid > 0) {
+ if (ret == FRAME_BROKER_ERROR_NONE) {
frame_context_destroy(broker->pre_context);
broker->pre_context = NULL;
ret = screen_connector_launcher_service_launch(handle->scls,
app_id, inst_id ? inst_id : "", pid, *serial);
if (ret != 0) {
- _E("Failed to launch scls evas. error(%d)", ret);
+ _E("Failed to launch scls. error(%d)", ret);
return FRAME_BROKER_ERROR_IO_ERROR;
}
handle->scls, app_id,
inst_id ? inst_id : "", pid, *serial);
if (ret != 0) {
- _E("Failed to launch scls evas with shared widget. error(%d)",
+ _E("Failed to launch scls with shared widget. error(%d)",
ret);
return FRAME_BROKER_ERROR_IO_ERROR;
}
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
+ _W("serial(%u)", serial);
ret = screen_connector_launcher_service_launching(
handle->scls, serial);
if (ret != 0) {
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
+ _W("serial(%u)", serial);
ret = screen_connector_launcher_service_launch_cancel(
handle->scls, serial);
if (ret != 0) {
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
+ _W("serial(%u)", serial);
ret = screen_connector_launcher_service_launch_done(
handle->scls, serial);
if (ret != 0) {
{
struct frame_context_s *context;
- if (!broker || !app_id || !inst_id || pid < 1 || !callback || !handle) {
+ if (!broker || !app_id || !callback || !handle) {
_E("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
return FRAME_BROKER_ERROR_OUT_OF_MEMORY;
}
- context->inst_id = strdup(inst_id);
+ context->inst_id = strdup(inst_id ? inst_id : "Unknown");
if (!context->inst_id) {
_E("Failed to duplicate instance ID");
frame_context_destroy(context);
int frame_context_destroy(frame_context_h handle)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
return FRAME_BROKER_ERROR_NONE;
}
+int frame_context_set_inst_id(frame_context_h handle, const char *inst_id)
+{
+ if (!handle || !inst_id) {
+ _W("Invalid parameter");
+ return FRAME_BROKER_ERROR_INVALID_PARAMETER;
+ }
+
+ free(handle->inst_id);
+ handle->inst_id = strdup(inst_id);
+
+ return FRAME_BROKER_ERROR_NONE;
+}
+
+int frame_context_set_pid(frame_context_h handle, int pid)
+{
+ if (!handle || pid < 0) {
+ _W("Invalid parameter");
+ return FRAME_BROKER_ERROR_INVALID_PARAMETER;
+ }
+
+ handle->pid = pid;
+
+ return FRAME_BROKER_ERROR_NONE;
+}
+
int frame_context_get_pid(frame_context_h handle, int *pid)
{
if (!handle || !pid) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
int frame_context_set_serial(frame_context_h handle, uint32_t serial)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
int frame_context_get_serial(frame_context_h handle, uint32_t *serial)
{
if (!handle || !serial) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
int frame_context_set_frame(frame_context_h handle, frame_h frame)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
int frame_context_get_frame(frame_context_h handle, frame_h *frame)
{
if (!handle || !frame) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
frame_context_state_e state)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
frame_context_state_e *state)
{
if (!handle || !state) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return FRAME_BROKER_ERROR_INVALID_PARAMETER;
}
void frame_context_on_create(frame_context_h handle)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return;
}
void frame_context_on_resume(frame_context_h handle, frame_h frame)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return;
}
void frame_context_on_pause(frame_context_h handle)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return;
}
void frame_context_on_destroy(frame_context_h handle)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return;
}
void frame_context_on_error(frame_context_h handle, frame_context_error_e error)
{
if (!handle) {
- _E("Invalid parameter");
+ _W("Invalid parameter");
return;
}