Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*hobby.h*/
- //TODO: ADD COMMENTS TO EVERYTHING
- #ifndef MAIN_
- #define MAIN_
- #include <string.h>
- #include <stdio.h>
- #include <stdbool.h>
- #include <stdlib.h>
- #include <assert.h>
- #include "set.h"
- #include "map.h"
- #include "list.h"
- #endif /* MAIN_ */
- #ifndef HOBBY_H_
- #define HOBBY_H_
- #include "user.h"
- typedef struct Hobby_t *HobbyData;
- typedef enum {
- HOBBY_SUCCESS,
- HOBBY_OUT_OF_MEMORY,
- HOBBY_NULL_ARGUMENT,
- HOBBY_ALREADY_EXISTS,
- HOBBY_DOESNT_EXIST,
- HOBBY_NO_HOBBIES,
- HOBBY_NO_USERS,
- HOBBY_INVALID_PARAMETERS,
- HOBBY_USER_ALREADY_EXISTS,
- HOBBY_USER_DOESNT_EXISTS,
- HOBBY_USER_DOESNT_PARTICIPATE_HOBBY,
- HOBBY_USER_ALREADY_PARTICIPATES_HOBBY
- } HobbyResult;
- HobbyResult hobbyAdd(Map hobbies, char* name);
- HobbyResult hobbyRemove(Map hobbies, char* name);
- HobbyResult hobbyJoin(Map hobbies ,Map users ,char* name ,int id);
- HobbyResult hobbyLeave(Map hobbies ,Map users ,char* name ,int id);
- HobbyResult hobbyReport(Map hobbies, int count);
- HobbyResult hobbyReportByAge(Map hobbies, Map users);
- int hobbyNumOfUsers(int id,Map hobbies);
- MapDataElement copyHobbyData(MapDataElement element);
- MapKeyElement copyHobbyKey(MapKeyElement key);
- Set getPplLikeHobby(HobbyData hobby);
- int getNumPplLikeHobby(HobbyData hobby);
- void freeHobbyData(MapDataElement element);
- void freeHobbyKey(MapKeyElement key);
- int compareMapKeys(MapKeyElement key1, MapKeyElement key2);
- #endif /* HOBBY_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement