-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.h
112 lines (96 loc) · 3.41 KB
/
commands.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
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
#ifndef _COMMANDS_H_
#define _COMMANDS_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
void addAuthor(char ** characteristics, int position, char ** arguments, int args);
/**
* button
* Creates a button in html
* @param characteristics Array of characteristics to do with button
* @param position length of characteristics
* @param arguments Used for login
* @param args Length of arguments
*/
void button(char ** characteristics, int position, char ** arguments, int args);
void createPost(char ** characteristics, int position, char ** arguments, int args);
/**
* concatenateArgs
* Concatenates arguments together and stores the appropriate args in the appropriate variables
* @param arguments The arguments
* @param args The length of arguments
* @param username The username of the user
* @param stream The stream of the user
* @param counter The current post that they are on
* @param limit The maximum number of posts they can view
* @param sorted Wether it is sorted by name or by date
*/
void concatenateArgs(char ** arguments, int args, char * username, char * stream, char * counter, char * limit, char * sorted);
/**
* endFile
* Ends the file by printing out closing html tags
*/
void endFile();
/**
* execute
* Executes the command, first checking current directory then a bin then /bin to see where it is
* @param characteristics Array of characteristics to do with the execution
* @param position length of characteristics
*/
void execute(char ** characteristics, int position);
/**
* header
* Creates a header in html
* @param characteristics Array of characteristics to do with header
* @param position length of characteristics
*/
void header(char ** characteristics, int position);
/**
* image
* Creates a image in html
* @param characteristics Array of characteristics to do with the image
* @param position length of characteristics
*/
void image(char ** characteristics, int position);
/**
* input
* Creates a input field in html
* @param characteristics Array of characteristics to do with the input field
* @param position length of characteristics
* @param arguments Used for login
* @param args Length of arguments
*/
void input(char ** characteristics, int position, char ** arguments, int args);
/**
* html_link
* Creates a link in html
* @param characteristics Array of characteristics to do with the link
* @param position length of characteristics
*/
void html_link(char ** characteristics, int position);
/**
* radio
* Creates a radio in html
* @param characteristics Array of characteristics to do with the radio
* @param position length of characteristics
*/
void radio(char ** characteristics, int position);
void startFile(char * title);
/**
* text
* Creates text in html (not really just outputs)
* @param characteristics Array of characteristics to do with text
* @param position length of characteristics
*/
void text(char ** characteristics, int position);
/**
* textArea
* Creates a textArea in html
* @param characteristics Array of characteristics to do with textArea
* @param position length of characteristics
*/
void textArea(char ** characteristics, int position);
#endif