|
cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
|
#import <CLScoreServerRequest.h>
Public Member Functions | |
| (id) | - initWithGameName:delegate: |
| (BOOL) | - requestScores:limit:offset:flags:category: |
| (BOOL) | - requestScores:limit:offset:flags: |
| (NSArray *) | - parseScores |
| (BOOL) | - requestRankForScore:andCategory: |
| (int) | - parseRank |
Static Public Member Functions | |
| (id) | + serverWithGameName:delegate: |
Protected Attributes | |
| NSString * | gameName |
| game name, used as a login name. | |
| id | delegate |
| delegate instance of fetch score | |
| NSURLConnection * | connection_ |
| the connection | |
Properties | |
| NSURLConnection * | connection |
Handles the Request Scores to the cocos live server
Definition at line 62 of file CLScoreServerRequest.h.
| - (id) initWithGameName: | (NSString *) | name | |
| delegate: | (id) | delegate | |
initializes a ScoreServerRequest with a game name
| - (int) parseRank |
It's actually not parsing anything, just returning int for a rank. Kept name PARSE for convinience with parseScores
| - (NSArray*) parseScores |
parse the received JSON scores and convert it to objective-c objects
| - (BOOL) requestRankForScore: | (int) | score | |
| andCategory: | (NSString *) | category | |
request rank for a given score using a predefined query. This is an asyncronous request. score: int for a score category: an NSString. For example: 'easy', 'medium', 'type1'... When requesting ranks, they can be filtered by this field.
| - (BOOL) requestScores: | (tQueryType) | type | |
| limit: | (int) | limit | |
| offset: | (int) | offset | |
| flags: | (tQueryFlags) | flags | |
request scores from server using a predefined query. This is an asyncronous request. limit: how many scores are being requested. Maximun is 100 flags: can be kQueryFlagByCountry (fetches only scores from country)
| - (BOOL) requestScores: | (tQueryType) | type | |
| limit: | (int) | limit | |
| offset: | (int) | offset | |
| flags: | (tQueryFlags) | flags | |
| category: | (NSString *) | category | |
request scores from server using a predefined query. This is an asyncronous request. limit: how many scores are being requested. Maximun is 100 flags: can be kQueryFlagByCountry (fetches only scores from country) category: an NSString. For example: 'easy', 'medium', 'type1'... When requesting scores, they can be filtered by this field.
| + (id) serverWithGameName: | (NSString *) | name | |
| delegate: | (id) | delegate | |
creates a ScoreServerRequest server with a game name
- (NSURLConnection*) connection_ [protected] |
the connection
Definition at line 77 of file CLScoreServerRequest.h.
- (id) delegate [protected] |
delegate instance of fetch score
Definition at line 68 of file CLScoreServerRequest.h.
- (NSString*) gameName [protected] |
game name, used as a login name.
Definition at line 65 of file CLScoreServerRequest.h.
- (NSURLConnection*) connection [read, write, retain] |
connection to the server
Definition at line 81 of file CLScoreServerRequest.h.