-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfirestore.h
35 lines (31 loc) · 1.72 KB
/
firestore.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
#ifndef __FIRESTORE_H__
#define __FIRESTORE_H__
#include <stdint.h>
typedef enum
{
FIRESTORE_OK = 0, /**< No error, everything OK */
FIRESTORE_ERR = -1, /**< Generic error */
FIRESTORE_ERR_HTTP = -2, /**< Timeout */
FIRESTORE_ERR_ARG = -4, /**< Illegal argument */
FIRESTORE_ERR_UNHANDLED = -5, /**< Unhandled feature/option */
FIRESTORE_ERR_MCU = -6, /**< MCU error */
FIRESTORE_ERR_OS = -7, /**< Operating system error */
}firestore_err_t;
firestore_err_t firestore_init(void);
firestore_err_t firestore_get_collection(char *pcCollectionId,
char **pcDocs,
uint32_t *pu32DocsLen);
firestore_err_t firestore_get_document(char *pcCollectionId,
char *pcDocumentId,
char **ppcDocument,
uint32_t *pu32DocumentLen);
firestore_err_t firestore_add_document(char *pcCollectionId,
char *pcDocumentId,
char *pcDocument,
uint32_t *pu32DocumentLen);
firestore_err_t firestore_update_document(char *pcCollectionId,
char *pcDocumentId,
char *pcDocument,
uint32_t *pu32DocumentLen);
firestore_err_t firestore_delete_document(char *pcCollectionId, char *pcDocumentId);
#endif /* __FIRESTORE_H__ */