Tizen 2.1 base
[framework/security/security-server.git] / src / include / security-server-cookie.h
1 /*
2  *  security-server
3  *
4  *  Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved\r
5  *
6  *  Contact: Bumjin Im <bj.im@samsung.com>
7  *
8  *  Licensed under the Apache License, Version 2.0 (the "License");
9  *  you may not use this file except in compliance with the License.
10  *  You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  *  Unless required by applicable law or agreed to in writing, software
15  *  distributed under the License is distributed on an "AS IS" BASIS,
16  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  *  See the License for the specific language governing permissions and
18  *  limitations under the License
19  *
20  */
21
22 #ifndef SECURITY_SERVER_COOKIE_H\r
23 #define SECURITY_SERVER_COOKIE_H\r
24 \r
25 #include "security-server-common.h"\r
26 \r
27 int free_cookie_item(cookie_list *cookie);
28 cookie_list *delete_cookie_item(cookie_list *cookie);
29 cookie_list *search_existing_cookie(int pid, const cookie_list *c_list);
30 cookie_list *search_cookie(const cookie_list *c_list, const unsigned char *cookie, int * privileges, int privilegesSize);
31 cookie_list *search_cookie_new(const cookie_list *c_list,
32                                const unsigned char *cookie,
33                                const char *object,
34                                const char *access_rights);
35 int generate_random_cookie(unsigned char *cookie, int size);
36 cookie_list *create_cookie_item(int pid, int sockfd, cookie_list *c_list);
37 cookie_list *create_default_cookie(void);
38 cookie_list * garbage_collection(cookie_list *cookie);
39 cookie_list *search_cookie_from_pid(cookie_list *c_list, int pid);
40 void printhex(const unsigned char *data, int size);\r
41 \r
42 #endif\r