ObjFW
src/OFURL.h
00001 /*
00002  * Copyright (c) 2008, 2009, 2010, 2011
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 
00019 @class OFString;
00020 
00024 @interface OFURL: OFObject <OFCopying>
00025 {
00026         OFString *scheme;
00027         OFString *host;
00028         uint16_t port;
00029         OFString *user;
00030         OFString *password;
00031         OFString *path;
00032         OFString *parameters;
00033         OFString *query;
00034         OFString *fragment;
00035 }
00036 
00037 #ifdef OF_HAVE_PROPERTIES
00038 @property (copy) OFString *scheme;
00039 @property (copy) OFString *host;
00040 @property (assign) uint16_t port;
00041 @property (copy) OFString *user;
00042 @property (copy) OFString *password;
00043 @property (copy) OFString *path;
00044 @property (copy) OFString *parameters;
00045 @property (copy) OFString *query;
00046 @property (copy) OFString *fragment;
00047 #endif
00048 
00053 + URLWithString: (OFString*)str;
00054 
00060 + URLWithString: (OFString*)str
00061   relativeToURL: (OFURL*)url;
00062 
00069 - initWithString: (OFString*)str;
00070 
00078 - initWithString: (OFString*)str
00079    relativeToURL: (OFURL*)url;
00080 
00084 - (OFString*)scheme;
00085 
00091 - (void)setScheme: (OFString*)scheme;
00092 
00096 - (OFString*)host;
00097 
00103 - (void)setHost: (OFString*)host;
00104 
00108 - (uint16_t)port;
00109 
00115 - (void)setPort: (uint16_t)port;
00116 
00120 - (OFString*)user;
00121 
00127 - (void)setUser: (OFString*)user;
00128 
00132 - (OFString*)password;
00133 
00139 - (void)setPassword: (OFString*)password;
00140 
00144 - (OFString*)path;
00145 
00151 - (void)setPath: (OFString*)path;
00152 
00156 - (OFString*)parameters;
00157 
00163 - (void)setParameters: (OFString*)parameters;
00164 
00168 - (OFString*)query;
00169 
00175 - (void)setQuery: (OFString*)query;
00176 
00180 - (OFString*)fragment;
00181 
00187 - (void)setFragment: (OFString*)fragment;
00188 @end
 All Classes Functions Variables