49 lines
1 KiB
C
49 lines
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);
|
|
int findListenerId(ptListener listenerChain);
|
|
ptListener newListenerChain();
|
|
void addListener(ptListener listenerChain, int id, char name[], int age, int level);
|
|
|
|
#endif // CONF_H
|