Tizen 2.1 base
[framework/multimedia/media-server.git] / common / include / media-server-thumb.h
1 /*
2  * media-thumbnail-server
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hyunjun Ko <zzoon.ko@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #include <glib.h>
23 #include <sys/socket.h>
24 #include <arpa/inet.h>
25 #include "media-server-types.h"
26 #include "media-server-ipc.h"
27
28 #ifndef _MEDIA_SERVER_THUMB_H_
29 #define _MEDIA_SERVER_THUMB_H_
30
31 GMainLoop *
32 ms_get_thumb_thread_mainloop(void);
33
34 int
35 ms_thumb_get_server_pid();
36
37 void
38 ms_thumb_reset_server_status();
39
40 gpointer
41 ms_thumb_agent_start_thread(gpointer data);
42
43 int
44 _ms_thumb_create_socket(int sock_type, int *sock);
45
46 int
47 _ms_thumb_create_udp_socket(int *sock);
48
49 gboolean
50 _ms_thumb_agent_prepare_udp_socket();
51
52 int
53 _ms_thumb_recv_msg(int sock, int header_size, thumbMsg *msg);
54
55 int
56 _ms_thumb_recv_udp_msg(int sock, int header_size, thumbMsg *msg, struct sockaddr_in *from_addr, unsigned int *from_size);
57
58 int
59 _ms_thumb_set_buffer(thumbMsg *req_msg, unsigned char **buf, int *buf_size);
60
61 #endif /*_MEDIA_SERVER_THUMB_H_*/
62