conf-database/conf.h
2023-11-20 18:53:08 +01:00

51 lines
1.1 KiB
C

#ifndef CONF_H
#define CONF_H
struct listenerList;
typedef struct conf {
int id;
char title[30];
char speaker[20];
int day;
int month;
int year;
struct listenerList* listeners;
struct conf* next;
} tConf;
typedef struct confList {
struct conf* conf;
struct confList* next;
} tConfList;
typedef struct listener {
int id;
char name[20];
int age;
int level;
struct confList* confs;
struct listener* prev;
struct listener* next;
} tListener;
typedef struct listenerList {
struct listener* listener;
struct listenerList* next;
} tListenerList;
typedef tConf* ptConf;
typedef tListener* ptListener;
typedef tConfList* ptConfList;
typedef tListenerList* ptListenerList;
int findConfId(ptConf confChain);
ptConf newConfChain();
void addConf(ptConf confChain, int id, char title[], char speaker[], int day, int month, int year);
void removeConf(ptConf confChain, int id);
int findListenerId(ptListener listenerChain);
ptListener newListenerChain();
void addListener(ptListener listenerChain, int id, char name[], int age, int level);
void removeListener(ptListener listenerChain, int id);
#endif // CONF_H