lftp  4.4.6
About: lftp is a command line ftp client (FTP, HTTP, ssl support, background transfer, reget, reput, ...)
  Fossies Dox: lftp-4.4.6.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
url Class Reference

#include <url.h>

Public Member Functions

 url (const char *u)
 
 url ()
 
 ~url ()
 
void SetPath (const char *p, const char *q=URL_PATH_UNSAFE)
 
char * Combine ()
 

Static Public Member Functions

static xstringencode (const char *s, int len, const char *unsafe)
 
static xstringencode (const xstring &s, const char *unsafe)
 
static xstringencode (const char *s, const char *unsafe)
 
static xstringdecode (const char *) __attribute__((warn_unused_result))
 
static bool is_url (const char *p)
 
static int path_index (const char *p)
 
static const char * path_ptr (const char *p)
 
static bool dir_needs_trailing_slash (const char *proto)
 
static bool find_password_pos (const char *url, int *start, int *len)
 
static const char * remove_password (const char *url)
 
static const char * hide_password (const char *url)
 

Public Attributes

char * proto
 
char * user
 
char * pass
 
char * host
 
char * port
 
char * path
 

Detailed Description

Definition at line 51 of file url.h.

Constructor & Destructor Documentation

url::url ( const char *  u)
url::url ( )
url::~url ( )

Member Function Documentation

char* url::Combine ( )
xstring & url::decode ( const char *  p)
static

Definition at line 343 of file url.cc.

References xstring::get_tmp(), xstring::null, and xstring::url_decode().

Referenced by FileAccess::Path::Change().

bool url::dir_needs_trailing_slash ( const char *  proto)
static
xstring & url::encode ( const char *  s,
int  len,
const char *  unsafe 
)
static
static xstring& url::encode ( const xstring s,
const char *  unsafe 
)
inlinestatic

Definition at line 70 of file url.h.

References encode(), and xstring::length().

Referenced by encode().

static xstring& url::encode ( const char *  s,
const char *  unsafe 
)
inlinestatic

Definition at line 71 of file url.h.

References encode().

Referenced by encode().

bool url::find_password_pos ( const char *  url,
int *  start,
int *  len 
)
static

Definition at line 368 of file url.cc.

References strchr, strstr(), and url().

Referenced by hide_password(), and remove_password().

const char * url::hide_password ( const char *  url)
static

Definition at line 395 of file url.cc.

References find_password_pos(), xstring::format(), and url().

Referenced by Bookmark::FormatHidePasswords().

bool url::is_url ( const char *  p)
static

Definition at line 410 of file url.cc.

References ParsedURL::proto, and url().

Referenced by CmdExec::builtin_cd(), CmdExec::builtin_open(), CMD(), mgetJob::Do(), and Http::Do().

int url::path_index ( const char *  p)
static
const char * url::path_ptr ( const char *  p)
static

Definition at line 286 of file url.cc.

References path_index().

Referenced by Ftp::Do(), and HttpTracker::SendTrackerRequest().

const char * url::remove_password ( const char *  url)
static

Definition at line 402 of file url.cc.

References find_password_pos(), xstring::format(), and url().

Referenced by FileCopy::LogTransfer(), and squeeze_file_name().

void url::SetPath ( const char *  p,
const char *  q = URL_PATH_UNSAFE 
)

Member Data Documentation

char* url::host

Definition at line 57 of file url.h.

char* url::pass

Definition at line 56 of file url.h.

char* url::path

Definition at line 59 of file url.h.

char* url::port

Definition at line 58 of file url.h.

char* url::proto

Definition at line 54 of file url.h.

Referenced by dir_needs_trailing_slash().

char* url::user

Definition at line 55 of file url.h.


The documentation for this class was generated from the following files: