-
Notifications
You must be signed in to change notification settings - Fork 17
/
swad_API.h
96 lines (81 loc) · 3.41 KB
/
swad_API.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
// swad_API.h: SWAD web API provided to external plugins
#ifndef _SWAD_API
#define _SWAD_API
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2024 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
#include "swad_cryptography.h"
/*****************************************************************************/
/***************************** Public constants ******************************/
/*****************************************************************************/
#define API_NUM_FUNCTIONS 35
#define API_BYTES_KEY Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64
#define API_MAX_BYTES_DEGREES_STR (1024 - 1)
/*****************************************************************************/
/******************************* Public types ********************************/
/*****************************************************************************/
// Add new functions at the end
typedef enum
{
API_unknown = 0, // unknown function
API_loginBySessionKey = 1,
API_loginByUserPassword = 2, // deprecated
API_loginByUserPasswordKey = 3,
API_getCourses = 4,
API_getUsers = 5,
API_getNotifications = 6,
API_getTestConfig = 7,
API_getTests = 8,
API_sendMessage = 9,
API_sendNotice = 10,
API_getDirectoryTree = 11,
API_getGroups = 12,
API_getGroupTypes = 13,
API_sendMyGroups = 14,
API_getFile = 15,
API_markNotificationsAsRead = 16,
API_getNewPassword = 17,
API_getCourseInfo = 18,
API_getAttendanceEvents = 19,
API_sendAttendanceEvent = 20,
API_getAttendanceUsers = 21,
API_sendAttendanceUsers = 22,
API_createAccount = 23,
API_getMarks = 24,
API_getTrivialQuestion = 25,
API_findUsers = 26,
API_removeAttendanceEvent = 27,
API_getGames = 28,
API_getMatches = 29,
API_getMatchStatus = 30,
API_answerMatchQuestion = 31,
API_getLocation = 32,
API_sendMyLocation = 33,
API_getLastLocation = 34,
API_getAvailableRoles = 35,
} API_Function_t;
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
struct soap *API_Get_gSOAP_RuntimeEnv (void);
void API_WebService (void);
void API_Exit (const char *DetailErrorMessage);
const char *API_GetFunctionNameFromFunCod (long FunCod);
#endif