4 * Copyright (c) 2012 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 #ifndef __PIMS_WORKER_H__
19 #define __PIMS_WORKER_H__
21 #include "pims-ipc-data-internal.h"
24 pims_ipc_svc_call_cb callback;
32 } pims_ipc_client_info_s;
36 void worker_start_idle_worker(pims_ipc_svc_s *ipc_data);
37 void worker_stop_idle_worker();
38 void worker_stop_client_worker(pims_ipc_svc_s *ipc_svc, const char *client_id);
41 int worker_push_raw_data(pims_ipc_worker_data_s *worker_data, int client_fd,
42 pims_ipc_raw_data_s *data);
44 int worker_wait_idle_worker_ready(pims_ipc_worker_data_s *worker_data);
45 pims_ipc_worker_data_s* worker_get_idle_worker(pims_ipc_svc_s *ipc_svc, const char *client_id);
46 int worker_set_callback(char *call_id, pims_ipc_svc_cb_s *cb_data);
47 pims_ipc_worker_data_s* worker_find(pims_ipc_svc_s *ipc_svc, const char *client_id);
49 void worker_free_data(gpointer data);
50 void worker_free_raw_data(void *data);
52 void client_init(void);
53 void client_deinit(void);
54 int client_register_info(int client_fd, int client_pid);
55 void client_destroy_info(gpointer p);
56 int client_get_unique_sequence_number(void);
57 pims_ipc_client_info_s* client_get_info(int worker_id);
58 pims_ipc_client_info_s* client_clone_info(pims_ipc_client_info_s *client_info);
60 #endif /*__PIMS_WORKER_H__*/