4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Yong Yeon Kim <yy9875.kim@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 * This file defines api utilities of IPC.
25 * @file media-util-ipc.h
26 * @author Haejeong Kim(backto.kim@samsung.com)
30 #ifndef _MEDIA_UTIL_IPC_H_
31 #define _MEDIA_UTIL_IPC_H_
37 #include <sys/socket.h>
38 #include <netinet/in.h>
39 #include <arpa/inet.h>
41 #include "media-server-ipc.h"
43 #define SERVER_IP "127.0.0.1"
50 int ms_ipc_create_client_socket(ms_protocol_e protocol, int timeout_sec, int *sock_fd);
51 int ms_ipc_create_server_socket(ms_protocol_e protocol, int port, int *sock_fd);
52 int ms_ipc_send_msg_to_server(int sockfd, int port, ms_comm_msg_s *send_msg, struct sockaddr_in *serv_addr);
53 int ms_ipc_send_msg_to_client(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_in *client_addr);
54 int ms_ipc_receive_message(int sockfd, void *recv_msg, unsigned int msg_size, struct sockaddr_in *client_addr, unsigned int *size);
55 int ms_ipc_wait_message(int sockfd, void *recv_msg, unsigned int msg_size, struct sockaddr_in *recv_addr, unsigned int *size);
61 #endif /*_MEDIA_UTIL_IPC_H_*/