1 /*
2  * Copyright (C) 2021-2023 Alibaba Group Holding Limited
3  */
4 
5 #ifndef _COMMON_H_
6 #define _COMMON_H_
7 
8 
9 #include <stdint.h>
10 #include "model/facebody.h"
11 #include "model/imageenhan.h"
12 #include "model/imagerecog.h"
13 #include "model/imageseg.h"
14 #include "model/objectdet.h"
15 #include "model/ocr.h"
16 #include "model/internal.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef union _AIModelResultStruct {
23     FacebodyResultStruct facebody;
24     ImageSegResultStruct imageseg;
25     ImageEnhanResultStruct imageenhan;
26     ImageRecogResultStruct imagerecog;
27     ObjectDetResultStruct objectdet;
28     OcrResultStruct ocr;
29 } AIModelResultStruct;
30 
31 
32 int getResponseBodyByUrl(const char *url, const char **buffer);
33 void setAccesskeyAndSecret(char *key, char *secret);
34 char *getTokenId(const char *domain, const char *region);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 #endif // _COMMON_H_
40