Git init
[pkgs/e/elektra.git] / src / backends / daemon / protocol.h
1 /***************************************************************************
2                 protocol.h  -  Interface for a protocol
3                              -------------------
4     begin                : Sun Mar 12 2006
5     copyright            : (C) 2006 by Yannick Lecaillez, Avi Alkalay
6     email                : avi@unix.sh
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the BSD License (revised).                      *
13  *                                                                         *
14  ***************************************************************************/
15
16 /***************************************************************************
17  *                                                                         *
18  * Class that implements a protocol.                                       *
19  *                                                                         *
20  ***************************************************************************/
21
22 /* Subversion stuff
23
24 $Id$
25
26 */
27
28 #ifndef PROTOCOL_H
29 #define PROTOCOL_H
30
31 #include "message.h"
32
33 typedef struct {
34         unsigned long  magic;
35         unsigned int   version;
36
37         size_t    dataLen;
38 } ProtocolHeader;
39
40 int protocolSendMessage(int fd, const Message *msg);
41 Message *protocolReadMessage(int fd);
42
43 #endif /* PROTOCOL_H */