Adding integration with DLP feature from privacy-guard
[platform/upstream/curl.git] / lib / extensions / curl_extensions.h
1 /***************************************************************************
2  *                                  _   _ ____  _
3  *  Project                     ___| | | |  _ \| |
4  *                             / __| | | | |_) | |
5  *                            | (__| |_| |  _ <| |___
6  *                             \___|\___/|_| \_\_____|
7  *
8  * Copyright (C) 2014 - 2016, Steve Holme, <steve_holme@hotmail.com>.
9  *
10  * This software is licensed as described in the file COPYING, which
11  * you should have received as part of this distribution. The terms
12  * are also available at https://curl.haxx.se/docs/copyright.html.
13  *
14  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15  * copies of the Software, and permit persons to whom the Software is
16  * furnished to do so, under the terms of the COPYING file.
17  *
18  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19  * KIND, either express or implied.
20  *
21  ***************************************************************************/
22
23 /**
24  * @file        curl_extensions.h
25  * @brief       API for privacy-guard-dlp
26  */
27
28 #ifdef USE_TIZEN_FEATURE_DLP
29 #ifndef HEADER_CURL_EXTENSIONS_H
30 #define HEADER_CURL_EXTENSIONS_H
31
32 #include <stddef.h>
33
34 /**
35  * @fn void curl_extensions_tizen_dlp_init(void)
36  * @brief Initialize the DLP creating the Load Rules and Logging threads
37  * @callgraph
38  */
39 void curl_extensions_tizen_dlp_init(void);
40
41 /**
42  * @fn void curl_extensions_tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
43  * @brief Checks for information leak on a given request string
44  *
45  * @param[in] hostname                                  The hostname of the server to which the request will be sent
46  * @param[in] mem                                               Text that we are going to validate for info leak
47  * @param[in] len                                               Size of len in bytes
48  *
49  * @return  either PRIV_GUARD_DLP_RESULT_ALLOW or PRIV_GUARD_DLP_RESULT_DENY
50  * @callgraph
51  */
52 void curl_extensions_tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len);
53
54 #endif /* HEADER_CURL_EXTENSIONS_H */
55 #endif /* USE_TIZEN_FEATURE_DLP */