-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmtm_escape.h
More file actions
120 lines (105 loc) · 3.13 KB
/
mtm_escape.h
File metadata and controls
120 lines (105 loc) · 3.13 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
* mtm_escape.h
*
* Created on: Jun 11, 2017
* Author: master
*/
#ifndef MTM_ESCAPE_H_
#define MTM_ESCAPE_H_
#include "system.h"
#include "common.h"
/* read line by line from channel in running the match command and \
* sending messages to channel out
* @param
* system - the main object of the system
* channel_in - the channel from which the function taking input\
* (stdin or file)
* channel_out - the channel to which the function sending output\
* (strout or file)
* @return
* faculty - copy of the faculty if success
* NULL - otherwise (memory leak)
*/
MtmErrorCode lineReaderFunction(EscapeSystem sys, FILE* channel_in, \
FILE* channel_out );
/* close channel out/in if it's file
* @param
* channel_in - the channel from which the function taking input\
* (stdin or file)
* channel_out - the channel to which the function sending output\
* (strout or file)
*/
void freeChannels(FILE* channelIn, FILE* channelOut );
/* running add company function
* @param
* system - the main object of the system
* @return
* all addCompany function (from system) return values
*/
MtmErrorCode addCompanyCase(EscapeSystem sys);
/* running remove company function
* @param
* system - the main object of the system
* @return
* all removeCompany function (from system) return values
*/
MtmErrorCode removeCompanyCase(EscapeSystem sys);
/* running add room function
* @param
* system - the main object of the system
* @return
* all addRoom function (from system) return values
*/
MtmErrorCode addRoomCase(EscapeSystem sys);
/* running remove room function
* @param
* system - the main object of the system
* @return
* all removeRoom function (from system) return values
*/
MtmErrorCode removeRoomCase(EscapeSystem sys);
/* running add escaper function
* @param
* system - the main object of the system
* @return
* all addEscaper function (from system) return values
*/
MtmErrorCode addEscaperCase(EscapeSystem sys);
/* running remove escaper function
* @param
* system - the main object of the system
* @return
* all remopveEscaper function (from system) return values
*/
MtmErrorCode removeEscaperCase(EscapeSystem sys);
/* running remove escaper function
* @param
* system - the main object of the system
* @return
* all remopveEscaper function (from system) return values
*/
MtmErrorCode addOrderCase(EscapeSystem sys);
/* running recommended order function
* @param
* system - the main object of the system
* @return
* all addRecommendedOrder function (from system) return values
*/
MtmErrorCode addRecommendedOrderCase(EscapeSystem sys);
/* running daily report function
* @param
* system - the main object of the system
* channel_our - channel to print the report
* @return
* all reportDay function (from system) return values
*/
MtmErrorCode reportDayCase(EscapeSystem sys, FILE* channel_out);
/* running report best function
* @param
* system - the main object of the system
* channel_our - channel to print the report
* @return
* all reportBest function (from system) return values
*/
MtmErrorCode reportBestCase(EscapeSystem sys, FILE* channel_out);
#endif /* MTM_ESCAPE_H_ */