Sipc.h
/*
* $Id: Sipc.h 3441 2012-11-01 20:40:30Z karijes $
*
* A very simple IPC
* Copyright (c) 2008 edelib authors
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EDELIB_SIPC_H__
#define __EDELIB_SIPC_H__
#include "edelib-global.h"
EDELIB_NS_BEGIN
#ifndef SKIP_DOCS
struct SipcServerPrivate;
struct SipcClientPrivate;
#endif
typedef void (*SipcCallback)(const char*, void*);
class EDELIB_API SipcServer {
private:
SipcServerPrivate* priv;
E_DISABLE_CLASS_COPY(SipcServer)
public:
SipcServer();
~SipcServer();
bool request_name(const char* prefix);
void callback(SipcCallback cb, void* data);
};
class EDELIB_API SipcClient {
private:
SipcClientPrivate* priv;
E_DISABLE_CLASS_COPY(SipcClient)
public:
SipcClient();
~SipcClient();
bool connect(const char* prefix);
void send(const char* msg);
};
EDELIB_NS_END
#endif
edelib::SipcServer
Simple IPC server.
Definition: Sipc.h:83
E_DISABLE_CLASS_COPY
#define E_DISABLE_CLASS_COPY(klass)
Definition: edelib-global.h:161
edelib::SipcCallback
void(* SipcCallback)(const char *, void *)
Definition: Sipc.h:37
edelib::SipcClient
Simple IPC client.
Definition: Sipc.h:133