summaryrefslogtreecommitdiff
path: root/server/include/thumb-server-dcm.h
blob: 9d41c1048e682e8c98b43d60ef0b8b486f4415fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * media-thumbnail-server
 *
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * Contact: Lei Zhang <lei527.zhang@samsung.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef _THUMB_SERVER_DCM_H_
#define _THUMB_SERVER_DCM_H_

#include <glib.h>
#include "media-thumb-ipc.h"

typedef enum {
	THUMB_SERVER_DCM_MSG_NONE = 0,
	THUMB_SERVER_DCM_MSG_SERVER_READY,
	THUMB_SERVER_DCM_MSG_STOP,
	THUMB_SERVER_DCM_MSG_SCAN_READY,  /* NOT_USED */
	THUMB_SERVER_DCM_MSG_SCAN_ALL,
	THUMB_SERVER_DCM_MSG_SCAN_SINGLE,
	THUMB_SERVER_DCM_MSG_MAX,
} thumb_server_dcm_ipc_msg_type_e;

typedef enum {
	THUMB_SERVER_DCM_PORT_DCM_RECV,
	THUMB_SERVER_DCM_PORT_THUMB_RECV,
	THUMB_SERVER_DCM_PORT_DCM_SVC_APP_RECV,
	THUMB_SERVER_DCM_PORT_MAX,
} thumb_server_dcm_port_type_e;

typedef struct {
	thumb_server_dcm_ipc_msg_type_e msg_type;
	uid_t uid;
	size_t msg_size; /*this is size of message below and this does not include the terminationg null byte ('\0'). */
	char msg[MAX_PATH_SIZE];
} thumb_server_dcm_ipc_msg_s;

gboolean _thumb_server_dcm_thread(void *data);
int _thumb_server_dcm_send_msg(thumb_server_dcm_ipc_msg_type_e msg_type, uid_t uid, const char *msg, thumb_server_dcm_port_type_e port);
void _thumb_server_dcm_quit_main_loop();
int thumb_server_dcm_get_server_pid();
void thumb_server_dcm_reset_server_status();

#endif /*_THUMB_SERVER_DCM_H_*/