tizen 2.4 release
[external/pacrunner.git] / src / js.h
1 /*
2  *
3  *  PACrunner - Proxy configuration daemon
4  *
5  *  Copyright (C) 2010-2011  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #define PACRUNNER_JS_PRIORITY_LOW      -100
23 #define PACRUNNER_JS_PRIORITY_DEFAULT     0
24 #define PACRUNNER_JS_PRIORITY_HIGH      100
25
26 struct pacrunner_js_driver {
27         const char *name;
28         int priority;
29         int (*set_proxy) (struct pacrunner_proxy *proxy);
30         char *(*execute)(const char *url, const char *host);
31 };
32
33 int pacrunner_js_driver_register(struct pacrunner_js_driver *driver);
34 void pacrunner_js_driver_unregister(struct pacrunner_js_driver *driver);