edelib 2.1.0
Sipc.h
1/*
2 * $Id: Sipc.h 3441 2012-11-01 20:40:30Z karijes $
3 *
4 * A very simple IPC
5 * Copyright (c) 2008 edelib authors
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __EDELIB_SIPC_H__
22#define __EDELIB_SIPC_H__
23
24#include "edelib-global.h"
25
26EDELIB_NS_BEGIN
27
28#ifndef SKIP_DOCS
29struct SipcServerPrivate;
30struct SipcClientPrivate;
31#endif
32
33
37typedef void (*SipcCallback)(const char*, void*);
38
83class EDELIB_API SipcServer {
84private:
85 SipcServerPrivate* priv;
87public:
92
97
105 bool request_name(const char* prefix);
106
113 void callback(SipcCallback cb, void* data);
114};
115
133class EDELIB_API SipcClient {
134private:
135 SipcClientPrivate* priv;
137public:
142
147
154 bool connect(const char* prefix);
155
161 void send(const char* msg);
162};
163
164EDELIB_NS_END
165#endif
Simple IPC client.
Definition Sipc.h:133
bool connect(const char *prefix)
void send(const char *msg)
Simple IPC server.
Definition Sipc.h:83
void callback(SipcCallback cb, void *data)
bool request_name(const char *prefix)
#define E_DISABLE_CLASS_COPY(klass)
Definition edelib-global.h:161