*/
+typedef struct _bundle_t bundle;
+
+
/**
* @brief Service handle.
*/
/**
+ * @brief Converts the service handle to bundle data.
+ *
+ * @param [in] service The service handle
+ * @param [out] data a bundle data on success
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SERVICE_ERROR_NONE Successful
+ * @retval #SERVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int service_to_bundle(service_h service, bundle **data);
+
+/**
* @brief Sets the operation to be performed.
*
* @details The @a operation is the mandatory information for the launch request.
int id;
service_type_e type;
bundle *data;
+ int launch_pid;
};
typedef struct service_request_context_s {
}
service_request->id = service_new_id();
+ service_request->launch_pid = -1;
*service = service_request;
}
}
+ service->launch_pid = launch_pid;
+
+ return SERVICE_ERROR_NONE;
+}
+
+
+int service_send_terminate_request(service_h service)
+{
+ if (service_valiate_service(service))
+ {
+ return service_error(SERVICE_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+ }
+
+ if(service->type != SERVICE_TYPE_REQUEST || service->launch_pid < 0)
+ {
+ return service_error(SERVICE_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+ }
+
+ appsvc_subapp_terminate_request_pid(service->launch_pid);
+
return SERVICE_ERROR_NONE;
}