Playlist Generator
1.0
|
00001 /* 00002 Copyright (c) 2011, Stig Brautaset. All rights reserved. 00003 00004 Redistribution and use in source and binary forms, with or without 00005 modification, are permitted provided that the following conditions are 00006 met: 00007 00008 Redistributions of source code must retain the above copyright 00009 notice, this list of conditions and the following disclaimer. 00010 00011 Redistributions in binary form must reproduce the above copyright 00012 notice, this list of conditions and the following disclaimer in the 00013 documentation and/or other materials provided with the distribution. 00014 00015 Neither the name of the the author nor the names of its contributors 00016 may be used to endorse or promote products derived from this software 00017 without specific prior written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00020 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00021 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00022 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00023 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00024 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00025 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00026 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00027 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00028 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00029 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 */ 00031 00032 #import <Foundation/Foundation.h> 00033 00034 00035 @interface SBJsonUTF8Stream : NSObject { 00036 @private 00037 const char *_bytes; 00038 NSMutableData *_data; 00039 NSUInteger _length; 00040 } 00041 00042 @property (assign) NSUInteger index; 00043 00044 - (void)appendData:(NSData*)data_; 00045 00046 - (BOOL)haveRemainingCharacters:(NSUInteger)chars; 00047 00048 - (void)skip; 00049 - (void)skipWhitespace; 00050 - (BOOL)skipCharacters:(const char *)chars length:(NSUInteger)len; 00051 00052 - (BOOL)getUnichar:(unichar*)ch; 00053 - (BOOL)getNextUnichar:(unichar*)ch; 00054 - (BOOL)getRetainedStringFragment:(NSString**)string; 00055 00056 - (NSString*)stringWithRange:(NSRange)range; 00057 00058 @end