aboutsummaryrefslogtreecommitdiffstats
path: root/lib/proxy.h
blob: 9688aaa61fe56b0628e5d9dd848d6d3f438f2969 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * nogaim
 *
 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

/* this is the export part of the proxy.c file. it does a little
   prototype-ing stuff and redefine some net function to mask them
   with some kind of transparent layer */

#ifndef _PROXY_H_
#define _PROXY_H_

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <glib.h>
#include <gmodule.h>

#include "events.h"

#define PROXY_NONE 0
#define PROXY_HTTP 1
#define PROXY_SOCKS4 2
#define PROXY_SOCKS5 3

extern char proxyhost[128];
extern int proxyport;
extern int proxytype;
extern char proxyuser[128];
extern char proxypass[128];

G_MODULE_EXPORT int proxy_connect(const char *host, int port, b_event_handler func, gpointer data);

#endif /* _PROXY_H_ */
lon => short_longitude, feed => "local:$short_latitude:$short_longitude", } ); url_skip = c.uri_for( '/report/new', { pc => pc latitude => short_latitude, longitude => short_longitude, skipped => 1, } ); PROCESS "maps/${map.type}.html"; INCLUDE 'header.html', title => loc('Viewing a location') rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], bodyclass => 'mappage', robots => 'noindex,nofollow'; %] <form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> [% IF c.req.params.map_override %] <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> [% END %] <input type="hidden" name="pc" value="[% pc | html %]"> <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> [% map_html %] <p id='sub_map_links'> [% IF c.req.params.no_pins %] <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a> [% ELSE %] <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> [% END %] [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] | [% IF c.req.params.all_pins %] <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide stale reports') %]</a> [% ELSE %] <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Include stale reports') %]</a> [% END %] [% END %] </p> </div> <div id="side"> <h1 class="big-green-banner">[% loc( 'Click map to report a problem' ) %]</h1> <p id="skip-this-step"> [% tprintf( loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"), url_skip ) %] </p> <div class="shadow-wrap"> <ul id="key-tools" class="singleton"> <li><a class="feed" href="[% email_url | html %]">Receive Updates</a></li> </ul> </div> <!-- <div id="email_alert_box"> <ul> <li><a href="[% rss_url | html %]" id="rss_alert">[% rss_alt %]</a></li> <li><a rel="nofollow" href="[% email_url | html %]">[%- loc('Email me new local problems') -%]</a></li> </ul> </div> --> <section class="full-width"> <menu id="problems-nav" class="tab-nav"> <ul> <li><a href="#current">[% loc('Problems on the map') %]</a></li> <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> </ul> </menu> <ul id="current" class="issue-list-a tab"> [% INCLUDE "around/on_map_list_items.html" %] </ul> <ul id="current_near" class="issue-list-a tab"> [% INCLUDE "around/around_map_list_items.html" %] </ul> </section> </div> <div style="display:none" id="side-form"> [% INCLUDE "report/new/fill_in_details_form.html" js = 1, report.used_map = 1 %] </div> </form> [% INCLUDE 'footer.html' %]