|
Wired Foundation
2.0
A foundation framework for the Wired implementation on Mac OS X
|
00001 /* $Id$ */ 00002 00003 /* 00004 * Copyright (c) 2003-2009 Axel Andersson 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 2. Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00017 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00018 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00019 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 00020 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00021 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00022 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00023 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00024 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00025 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00026 * POSSIBILITY OF SUCH DAMAGE. 00027 */ 00028 00029 @interface WIURL : WIObject <NSCoding, NSCopying> { 00030 NSString *_scheme; 00031 NSString *_host; 00032 NSUInteger _port; 00033 NSString *_user; 00034 NSString *_password; 00035 NSString *_path; 00036 NSString *_query; 00037 } 00038 00039 + (id)URLWithString:(NSString *)string; 00040 + (id)URLWithString:(NSString *)string scheme:(NSString *)defaultScheme; 00041 + (id)URLWithScheme:(NSString *)scheme hostpair:(NSString *)pairhost; 00042 + (id)URLWithScheme:(NSString *)scheme host:(NSString *)host port:(NSUInteger)port; 00043 + (id)URLWithURL:(NSURL *)url; 00044 + (id)fileURLWithPath:(NSString *)path; 00045 00046 - (id)initWithScheme:(NSString *)scheme host:(NSString *)host port:(NSUInteger)port; 00047 00048 - (NSString *)string; 00049 - (NSString *)humanReadableString; 00050 - (WIURL *)URLByDeletingLastPathComponent; 00051 - (NSURL *)URL; 00052 - (BOOL)isFileURL; 00053 00054 - (void)setScheme:(NSString *)value; 00055 - (NSString *)scheme; 00056 - (void)setHostpair:(NSString *)value; 00057 - (NSString *)hostpair; 00058 - (void)setHost:(NSString *)value; 00059 - (NSString *)host; 00060 - (void)setPort:(NSUInteger)value; 00061 - (NSUInteger)port; 00062 - (void)setUser:(NSString *)value; 00063 - (NSString *)user; 00064 - (void)setPassword:(NSString *)value; 00065 - (NSString *)password; 00066 - (void)setPath:(NSString *)value; 00067 - (NSString *)path; 00068 - (NSString *)pathExtension; 00069 - (NSString *)lastPathComponent; 00070 - (void)setQuery:(NSString *)query; 00071 - (NSString *)query; 00072 - (NSDictionary *)queryParameters; 00073 00074 @end