XMMS2
xmmsc_ipc_transport.h
Go to the documentation of this file.
1 /* XMMS2 - X Music Multiplexer System
2  * Copyright (C) 2003-2011 XMMS2 Team
3  *
4  * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  */
16 
17 
18 #ifndef XMMS_IPC_TRANSPORT_H
19 #define XMMS_IPC_TRANSPORT_H
20 
21 #include "xmmsc/xmmsc_stdint.h"
22 #include "xmmsc/xmmsc_sockets.h"
23 
25 
26 typedef int (*xmms_ipc_read_func) (xmms_ipc_transport_t *, char *, int);
27 typedef int (*xmms_ipc_write_func) (xmms_ipc_transport_t *, char *, int);
28 typedef xmms_ipc_transport_t *(*xmms_ipc_accept_func) (xmms_ipc_transport_t *);
30 
32 int xmms_ipc_transport_read (xmms_ipc_transport_t *ipct, char *buffer, int len);
33 int xmms_ipc_transport_write (xmms_ipc_transport_t *ipct, char *buffer, int len);
38 char * xmms_ipc_hostname (const char *path);
39 
41  char *path;
42  void *data;
44  int32_t peer;
45  int16_t peer_port;
46 
51 };
52 
53 #endif
54 
int xmms_ipc_transport_read(xmms_ipc_transport_t *ipct, char *buffer, int len)
Definition: transport.c:37
xmms_socket_t xmms_ipc_transport_fd_get(xmms_ipc_transport_t *ipct)
Definition: transport.c:49
xmms_ipc_write_func write_func
xmms_ipc_destroy_func destroy_func
void(* xmms_ipc_destroy_func)(xmms_ipc_transport_t *)
xmms_ipc_transport_t * xmms_ipc_server_init(const char *path)
xmms_ipc_accept_func accept_func
int xmms_socket_t
Definition: xmmsc_sockets.h:37
int xmms_ipc_transport_write(xmms_ipc_transport_t *ipct, char *buffer, int len)
Definition: transport.c:43
xmms_ipc_transport_t * xmms_ipc_server_accept(xmms_ipc_transport_t *ipct)
Definition: transport.c:56
xmms_ipc_transport_t *(* xmms_ipc_accept_func)(xmms_ipc_transport_t *)
int(* xmms_ipc_write_func)(xmms_ipc_transport_t *, char *, int)
xmms_ipc_read_func read_func
char * xmms_ipc_hostname(const char *path)
Definition: transport.c:67
xmms_ipc_transport_t * xmms_ipc_client_init(const char *path)
Definition: transport_unix.c:9
void xmms_ipc_transport_destroy(xmms_ipc_transport_t *ipct)
Definition: transport.c:27
int(* xmms_ipc_read_func)(xmms_ipc_transport_t *, char *, int)