Obsolete
/
libipc-old
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
libipc-old/pubsub/lib/pubsub.h

27 lines
943 B
C
Raw Normal View History

2017-01-19 22:07:52 +01:00
#ifndef __PUBSUB_H__
#define __PUBSUB_H__
#include "../../core/communication.h"
2018-10-04 01:22:50 +02:00
#include "../../core/client.h"
2017-01-19 22:07:52 +01:00
#include "../../core/queue.h"
2018-10-09 13:20:26 +02:00
#include "message.h"
2017-01-19 22:07:52 +01:00
enum subscriber_action {PUBSUB_QUIT = 1, PUBSUB_PUB, PUBSUB_SUB, PUBSUB_BOTH};
#define PUBSUB_TYPE_DISCONNECT 0
#define PUBSUB_TYPE_MESSAGE 1
#define PUBSUB_TYPE_ERROR 2
#define PUBSUB_TYPE_DEBUG 4
#define PUBSUB_TYPE_INFO 5
2018-10-04 00:30:47 +02:00
int pubsub_connection (int argc, char **argv, char **env, struct ipc_service *srv);
int pubsub_disconnect (struct ipc_service *srv);
int pubsub_message_send (struct ipc_service *srv, const struct pubsub_msg * m);
int pubsub_message_recv (struct ipc_service *srv, struct pubsub_msg *m);
2017-01-19 22:07:52 +01:00
// TODO
2018-10-04 00:30:47 +02:00
void pubsub_quit (struct ipc_service *srv);
2017-01-19 22:07:52 +01:00
#endif