~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to lib/url.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This file is part of BOINC.
 
2
// http://boinc.berkeley.edu
 
3
// Copyright (C) 2009 University of California
 
4
//
 
5
// BOINC is free software; you can redistribute it and/or modify it
 
6
// under the terms of the GNU Lesser General Public License
 
7
// as published by the Free Software Foundation,
 
8
// either version 3 of the License, or (at your option) any later version.
 
9
//
 
10
// BOINC is distributed in the hope that it will be useful,
 
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
13
// See the GNU Lesser General Public License for more details.
 
14
//
 
15
// You should have received a copy of the GNU Lesser General Public License
 
16
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 
17
 
 
18
#define URL_PROTOCOL_UNKNOWN 0
 
19
#define URL_PROTOCOL_HTTP    1
 
20
#define URL_PROTOCOL_HTTPS   2
 
21
#define URL_PROTOCOL_SOCKS   3
 
22
 
 
23
struct PARSED_URL {
 
24
    int protocol;
 
25
    char user[256];
 
26
    char passwd[256];
 
27
    char host[256];
 
28
    int port;
 
29
    char file[256];
 
30
};
 
31
 
 
32
extern void parse_url(const char* url, PARSED_URL&);
 
33
extern void unescape_url(std::string& url);
 
34
extern void unescape_url(char *url);
 
35
extern void escape_url(std::string& url);
 
36
extern void escape_url(char *in, char*out);
 
37
extern void escape_url_readable(char* in, char* out);
 
38
extern void escape_project_url(char *in, char* out);
 
39
extern bool valid_master_url(char*);
 
40
extern void canonicalize_master_url(char *url);
 
41
extern void canonicalize_master_url(std::string&);