EmotivCloudClient.h
Go to the documentation of this file.
1 
16 
18 #ifndef EMOTIVCLOUDCLIENT_H
19 #define EMOTIVCLOUDCLIENT_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #if (!EDK_STATIC_LIB)
26 # ifdef EMOTIVCLOUDCLIENT_EXPORTS
27 # ifdef _WIN32
28 # define EMOTIVCLOUD_API __declspec(dllexport)
29 # else
30 # if (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER || defined __clang__
31 # define EMOTIVCLOUD_API __attribute__ ((visibility("default")))
32 # else
33 # define EMOTIVCLOUD_API
34 # endif
35 # endif
36 # else
37 # ifdef _WIN32
38 # define EMOTIVCLOUD_API __declspec(dllimport)
39 # else
40 # define EMOTIVCLOUD_API
41 # endif
42 # endif
43 #else
44 # define EMOTIVCLOUD_API extern
45 #endif
46 
47 #define MAX_NUM_OF_BACKUP_PROFILE_VERSION 2
48 
49 
51 typedef enum profileType {
55 
56 
58 typedef struct profileVerInfo {
59  int version;
60  char last_modified[30];
62 
63 
65 
72 EC_Connect();
73 
74 
76 
84 
85 
87 
95 
96 
98 
104 EMOTIVCLOUD_API int
106 
107 
109 
119 EMOTIVCLOUD_API int
120 EC_Login(const char * username, const char * password);
121 
122 
124 /*
125  \return EC_ERROR_CODE
126  - EC_OK if logout successfully
127 
128  \sa EC_Login()
129  */
130 EMOTIVCLOUD_API int
131 EC_Logout(int userCloudID);
132 
133 
135 
142 EMOTIVCLOUD_API int
143 EC_GetUserDetail(int * userCloudID);
144 
145 
147 
158 EMOTIVCLOUD_API int
159 EC_SaveUserProfile(int userCloudID, int engineUserID, const char * profileName,
160  profileFileType ptype);
161 
162 
164 
174 EMOTIVCLOUD_API int
175 EC_UpdateUserProfile(int userCloudID, int engineUserID, int profileId);
176 
177 
179 
188 EMOTIVCLOUD_API int
189 EC_DeleteUserProfile(int userCloudID, int profileId);
190 
191 
193 
198 EMOTIVCLOUD_API int
199 EC_GetProfileId(int userCloudID, const char * profileName);
200 
201 
203 
213 EMOTIVCLOUD_API int
214 EC_LoadUserProfile(int userCloudID, int engineUserID, int profileId,
215  int version = -1);
216 
217 
219 
227 EMOTIVCLOUD_API int
228 EC_GetAllProfileName(int userCloudID);
229 
230 
232 
238 EMOTIVCLOUD_API int
239 EC_ProfileIDAtIndex(int userCloudID, int index);
240 
241 
243 
249 EMOTIVCLOUD_API const char *
250 EC_ProfileNameAtIndex(int userCloudID, int index);
251 
252 
254 
260 EMOTIVCLOUD_API const char *
261 EC_ProfileLastModifiedAtIndex(int userCloudID, int index);
262 
263 
265 
271 EMOTIVCLOUD_API profileFileType
272 EC_ProfileTypeAtIndex(int userCloudID, int index);
273 
274 #ifdef __cplusplus
275 }
276 #endif
277 #endif // EMOTIVCLOUDCLIENT_H
struct profileVerInfo profileVersionInfo
Profile version.
EMOTIVCLOUD_API int EC_LoadUserProfile(int userCloudID, int engineUserID, int profileId, int version=-1)
Load profile from Emotiv Cloud.
EMOTIVCLOUD_API int EC_GetAllProfileName(int userCloudID)
Update all the profile info from Emotiv Cloud.
EMOTIVCLOUD_API int EC_DisconnectEngine()
Disconnect Emotiv engine.
EMOTIVCLOUD_API int EC_ReconnectEngine()
Reconnect Emotiv engine.
profileType
Profile types.
Definition: EmotivCloudClient.h:51
#define EMOTIVCLOUD_API
Definition: EmotivCloudClient.h:40
EMOTIVCLOUD_API profileFileType EC_ProfileTypeAtIndex(int userCloudID, int index)
Return the type of a profile in cache.
Profile version.
Definition: EmotivCloudClient.h:58
EMOTIVCLOUD_API int EC_Logout(int userCloudID)
Logout Emotiv Cloud.
Definition: EmotivCloudClient.h:53
EMOTIVCLOUD_API int EC_Login(const char *username, const char *password)
Login Emotiv Cloud with EmotivID.
EMOTIVCLOUD_API int EC_Disconnect()
Terminate connection to Emotiv Cloud server.
EMOTIVCLOUD_API int EC_UpdateUserProfile(int userCloudID, int engineUserID, int profileId)
Update user profile to Emotiv Cloud.
char last_modified[30]
Definition: EmotivCloudClient.h:60
EMOTIVCLOUD_API int EC_DeleteUserProfile(int userCloudID, int profileId)
Delete user profile from Emotiv Cloud.
int version
Definition: EmotivCloudClient.h:59
EMOTIVCLOUD_API int EC_GetUserDetail(int *userCloudID)
Get user ID after login.
Definition: EmotivCloudClient.h:52
EMOTIVCLOUD_API int EC_SaveUserProfile(int userCloudID, int engineUserID, const char *profileName, profileFileType ptype)
Save user profile to Emotiv Cloud.
EMOTIVCLOUD_API int EC_ProfileIDAtIndex(int userCloudID, int index)
Return the profile ID of a profile in cache.
EMOTIVCLOUD_API int EC_GetProfileId(int userCloudID, const char *profileName)
Get profile ID of a user.
EMOTIVCLOUD_API int EC_Connect()
Initialize connection to Emotiv Cloud Server.
enum profileType profileFileType
Profile types.
EMOTIVCLOUD_API const char * EC_ProfileNameAtIndex(int userCloudID, int index)
Return the profile name of a profile in cache.
EMOTIVCLOUD_API const char * EC_ProfileLastModifiedAtIndex(int userCloudID, int index)
Return the last modified timestamp of a profile in cache.