]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/configuration/sgconfig-ng/proto.h
Merge branch 'naffanya-dev'
[stg.git] / projects / stargazer / plugins / configuration / sgconfig-ng / proto.h
1 #ifndef __PROTO_H__
2 #define __PROTO_H__
3
4 #define PROTO_MAGIC "12345678"
5
6 namespace REQ {
7     struct HEADER {
8         char magic[8];
9         uint32_t version;
10         char login[36];
11     };
12
13     struct CRYPTO_HEADER {
14         char login[36];
15         uint32_t dataSize;
16     };
17 }
18
19 namespace RESP {
20     enum {
21         OK = 0,
22         INVALID_MAGIC,
23         UNSUPPORTED_VERSION,
24         INVALID_CREDENTIALS
25     };
26
27     struct HEADER {
28         char magic[8];
29         uint32_t version;
30         uint32_t code;
31     };
32
33     struct CRYPTO_HEADER {
34         char login[36];
35         uint32_t dataSize;
36     };
37 }
38
39 #endif