-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvent.h
40 lines (28 loc) · 834 Bytes
/
Event.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Event.h
// Week 8
//
// Created by Ashley Coleman on 7/5/18.
// Copyright © 2018 Ashley Coleman. All rights reserved.
//
#ifndef Event_h
#define Event_h
#include <stdio.h>
#define TITLELENGTH 21
#define DESCLENGTH 201
typedef enum EventType {Calendar0, Calendar1, Calendar2} EventType;
static char typeNames[3][TITLELENGTH] = {"Calendar0","Calendar1","Calendar2"};
typedef struct Event {
EventType type;
int start;
int end;
char title[TITLELENGTH];
char desc[DESCLENGTH];
} Event;
Event * new_Event(EventType type, int start, int end, char * title, char * desc);
char * toEventString(Event * e, char * str);
void setTypeNames(char type0[TITLELENGTH], char type1[TITLELENGTH], char type2[TITLELENGTH]);
void printTypes();
char * returnTypes(int i);
int Equals(Event * e1, Event * e2);
#endif /* Event_h */