Began updating server data definitions.

This commit is contained in:
2026-02-21 09:20:36 -05:00
parent 2b13e159e9
commit f9f03528d8
5 changed files with 117 additions and 0 deletions

31
server/src/include/data.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef DATA__H
#define DATA__H
#include <time.h>
#define NAME_MAX_LENGTH 16
#define MSG_MAX_LENGTH 1024
typedef int UserID;
typedef int MsgID;
typedef char Name[NAME_MAX_LENGTH];
int name_verify(const char* name);
typedef char MsgContent[MSG_MAX_LENGTH];
int msg_verify(const char* content);
typedef struct {
UserID id;
Name name;
} UserData;
typedef struct {
MsgID id;
UserData author;
MsgID parent;
MsgContent content;
time_t timestamp;
} MsgData;
#endif