Playlist Generator  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
SBJsonStreamParserState.h
Go to the documentation of this file.
00001 /*
00002  Copyright (c) 2010, Stig Brautaset.
00003  All rights reserved.
00004  
00005  Redistribution and use in source and binary forms, with or without
00006  modification, are permitted provided that the following conditions are
00007  met:
00008  
00009    Redistributions of source code must retain the above copyright
00010    notice, this list of conditions and the following disclaimer.
00011   
00012    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    Neither the name of the the author nor the names of its contributors
00017    may be used to endorse or promote products derived from this software
00018    without specific prior written permission.
00019  
00020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
00021  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00022  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00023  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00024  HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00025  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00026  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00027  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00028  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00029  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00030  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  */
00032 
00033 #import <Foundation/Foundation.h>
00034 
00035 #import "SBJsonTokeniser.h"
00036 #import "SBJsonStreamParser.h"
00037 
00038 @interface SBJsonStreamParserState : NSObject
00039 + (id)sharedInstance;
00040 
00041 - (BOOL)parser:(SBJsonStreamParser*)parser shouldAcceptToken:(sbjson_token_t)token;
00042 - (SBJsonStreamParserStatus)parserShouldReturn:(SBJsonStreamParser*)parser;
00043 - (void)parser:(SBJsonStreamParser*)parser shouldTransitionTo:(sbjson_token_t)tok;
00044 - (BOOL)needKey;
00045 - (BOOL)isError;
00046 
00047 - (NSString*)name;
00048 
00049 @end
00050 
00051 @interface SBJsonStreamParserStateStart : SBJsonStreamParserState
00052 @end
00053 
00054 @interface SBJsonStreamParserStateComplete : SBJsonStreamParserState
00055 @end
00056 
00057 @interface SBJsonStreamParserStateError : SBJsonStreamParserState
00058 @end
00059 
00060 
00061 @interface SBJsonStreamParserStateObjectStart : SBJsonStreamParserState
00062 @end
00063 
00064 @interface SBJsonStreamParserStateObjectGotKey : SBJsonStreamParserState
00065 @end
00066 
00067 @interface SBJsonStreamParserStateObjectSeparator : SBJsonStreamParserState
00068 @end
00069 
00070 @interface SBJsonStreamParserStateObjectGotValue : SBJsonStreamParserState
00071 @end
00072 
00073 @interface SBJsonStreamParserStateObjectNeedKey : SBJsonStreamParserState
00074 @end
00075 
00076 @interface SBJsonStreamParserStateArrayStart : SBJsonStreamParserState
00077 @end
00078 
00079 @interface SBJsonStreamParserStateArrayGotValue : SBJsonStreamParserState
00080 @end
00081 
00082 @interface SBJsonStreamParserStateArrayNeedValue : SBJsonStreamParserState
00083 @end