ObjFW
src/OFURL.h
00001 /*
00002  * Copyright (c) 2008, 2009, 2010, 2011, 2012
00003  *   Jonathan Schleifer <js@webkeks.org>
00004  *
00005  * All rights reserved.
00006  *
00007  * This file is part of ObjFW. It may be distributed under the terms of the
00008  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
00009  * the packaging of this file.
00010  *
00011  * Alternatively, it may be distributed under the terms of the GNU General
00012  * Public License, either version 2 or 3, which can be found in the file
00013  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
00014  * file.
00015  */
00016 
00017 #import "OFObject.h"
00018 #import "OFSerialization.h"
00019 
00020 @class OFString;
00021 
00025 @interface OFURL: OFObject <OFCopying, OFSerialization>
00026 {
00027         OFString *scheme;
00028         OFString *host;
00029         uint16_t port;
00030         OFString *user;
00031         OFString *password;
00032         OFString *path;
00033         OFString *parameters;
00034         OFString *query;
00035         OFString *fragment;
00036 }
00037 
00038 #ifdef OF_HAVE_PROPERTIES
00039 @property (copy) OFString *scheme;
00040 @property (copy) OFString *host;
00041 @property uint16_t port;
00042 @property (copy) OFString *user;
00043 @property (copy) OFString *password;
00044 @property (copy) OFString *path;
00045 @property (copy) OFString *parameters;
00046 @property (copy) OFString *query;
00047 @property (copy) OFString *fragment;
00048 #endif
00049 
00056 + URLWithString: (OFString*)string;
00057 
00065 + URLWithString: (OFString*)string
00066   relativeToURL: (OFURL*)URL;
00067 
00074 - initWithString: (OFString*)string;
00075 
00084 - initWithString: (OFString*)string
00085    relativeToURL: (OFURL*)url;
00086 
00092 - (OFString*)scheme;
00093 
00099 - (void)setScheme: (OFString*)scheme;
00100 
00106 - (OFString*)host;
00107 
00113 - (void)setHost: (OFString*)host;
00114 
00120 - (uint16_t)port;
00121 
00127 - (void)setPort: (uint16_t)port;
00128 
00134 - (OFString*)user;
00135 
00141 - (void)setUser: (OFString*)user;
00142 
00148 - (OFString*)password;
00149 
00155 - (void)setPassword: (OFString*)password;
00156 
00162 - (OFString*)path;
00163 
00169 - (void)setPath: (OFString*)path;
00170 
00176 - (OFString*)parameters;
00177 
00183 - (void)setParameters: (OFString*)parameters;
00184 
00190 - (OFString*)query;
00191 
00197 - (void)setQuery: (OFString*)query;
00198 
00204 - (OFString*)fragment;
00205 
00211 - (void)setFragment: (OFString*)fragment;
00212 
00218 - (OFString*)string;
00219 @end
 All Classes Functions Variables Properties