aboutsummaryrefslogtreecommitdiff
path: root/inc/alarmd_proto.h
blob: 3082424f3b5c76deec26b2829615a54e046de4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef ALARMD_PROTO_H
#define ALARMD_PROTO_H

#include <stdint.h>
#include <uuid/uuid.h>

#define ALARMD_PORT "1433"

enum alarmd_packet_type {
	ALARMD_PACKET_TYPE_REGISTER,
	ALARMD_PACKET_TYPE_DEREGISTER,
	ALARMD_PACKET_TYPE_RAISE,
	ALARMD_PACKET_TYPE_CLEAR,
	ALARMD_PACKET_TYPE_QUERY,
};

int8_t recv_string(int sock, char (*buffer)[128]);
int send_string(int sock, char *buffer);
int alarmd_register(int sock, char *desc, uuid_t *uuid);
int alarmd_deregister(int sock, uuid_t uuid);
int alarmd_raise(int sock, uuid_t uuid);
int alarmd_clear(int sock, uuid_t uuid);

#endif /* ALARMD_PROTO_H */