include/OFPlayedGame.h

Go to the documentation of this file.
00001 //  Copyright 2009-2010 Aurora Feint, Inc.
00002 // 
00003 //  Licensed under the Apache License, Version 2.0 (the "License");
00004 //  you may not use this file except in compliance with the License.
00005 //  You may obtain a copy of the License at
00006 //  
00007 //      http://www.apache.org/licenses/LICENSE-2.0
00008 //      
00009 //  Unless required by applicable law or agreed to in writing, software
00010 //  distributed under the License is distributed on an "AS IS" BASIS,
00011 //  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012 //  See the License for the specific language governing permissions and
00013 //  limitations under the License.
00014 
00015 #import "OFResource.h"
00016 
00017 @class OFService;
00018 @class OFUserGameStat;
00019 @class OFRequestHandle;
00020 class OFHttpService;
00021 class OFImageViewHttpServiceObserver;
00022 
00023 @protocol OFPlayedGameDelegate;
00024 
00030 @interface OFPlayedGame : OFResource<OFCallbackable>
00031 {
00032 @private
00033     NSString* name;
00034     NSString* iconUrl;
00035     NSString* clientApplicationId;
00036     NSUInteger totalGamerscore;
00037     NSUInteger friendsWithApp;
00038     NSMutableArray* userGameStats;
00039     NSString* iTunesAppStoreUrl;
00040     BOOL favorite;
00041     NSString* review;
00042     OFPointer<OFHttpService> mHttpService;
00043     OFPointer<OFImageViewHttpServiceObserver> mHttpServiceObserver;
00044 }
00045 
00052 + (void)setDelegate:(id<OFPlayedGameDelegate>)delegate;
00053 
00062 + (OFRequestHandle*)getFeaturedGames;
00063 
00069 - (BOOL)isOwnedByCurrentUser;
00070 
00079 - (OFRequestHandle*)getGameIcon;
00080 
00084 @property (nonatomic, readonly) NSString* name;
00085 
00089 @property (nonatomic, readonly) NSString* clientApplicationId;
00090 
00094 @property (nonatomic, readonly) NSString* iTunesAppStoreUrl;
00095 
00099 + (NSString*)getResourceName;
00100 - (OFUserGameStat*)getLocalUsersGameStat;
00101 @property (nonatomic, readonly) NSMutableArray* userGameStats;
00102 @property (nonatomic, readonly) NSString* iconUrl;
00103 @property (nonatomic, readonly) NSUInteger totalGamerscore;
00104 @property (nonatomic, readonly) NSUInteger friendsWithApp;
00105 @property (nonatomic, readonly) BOOL favorite;
00106 @property (nonatomic, readonly) NSString* review;
00107 
00108 @end
00109 
00114 @protocol OFPlayedGameDelegate
00115 @optional
00121 - (void)didGetFeaturedGames:(NSArray*)featuredGames;
00122 
00126 - (void)didFailGetFeaturedGames;
00127 
00134 - (void)didGetGameIcon:(UIImage*)image OFPlayedGame:(OFPlayedGame*)game;
00135 
00141 - (void)didFailGetGameIconOFPlayedGame:(OFPlayedGame*)game;
00142 
00143 @end
 All Classes Files Functions Variables Enumerations Enumerator Properties