all repos — xrxs @ c35d47c8b829529347e70f9d81d8a13fb99d3943

experimental networked application/game server with 9p

server/cart.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
typedef struct UserInfo UserInfo;
typedef unsigned int uint;

typedef struct Blob {
  char* data;
  uvlong length;
} Blob;

typedef struct Cart {
  char name[32];
  Blob* rom;
  Blob* txt_data;
  Blob* sprite_data;
  Blob* audio_data;
} Cart;

Cart* create_cart(char* name);
Cart* find_cart(UserInfo* table, char* name);
int get_chunk(UserInfo* table, char* uname, char* chunk);
uint count_carts(UserInfo* table, char* name);
void destroy_cart(Cart* self);