Public Member Functions | Static Public Member Functions | Protected Attributes | Properties

CLScoreServerPost Class Reference

#import <CLScoreServerPost.h>

List of all members.

Public Member Functions

(id) - initWithGameName:gameKey:delegate:
(BOOL) - sendScore:
(BOOL) - updateScore:

Static Public Member Functions

(id) + serverWithGameName:gameKey:delegate:

Protected Attributes

NSString * gameKey
NSString * gameName
 game name, used as a login name.
id delegate
 delegate instance of fetch score
NSUInteger ranking_
 ranking
BOOL scoreDidUpdate_
 score was updated
NSMutableData * receivedData
 data received
NSMutableArray * bodyValues
 values to send in the POST
tPostStatus postStatus_
 status of the request
CC_MD5_CTX md5Ctx
 mdt context
NSURLConnection * connection_
 the connection

Properties

tPostStatus postStatus
NSURLConnection * connection
NSUInteger ranking
BOOL scoreDidUpdate

Detailed Description

Handles the Score Post to the cocos live server

Definition at line 68 of file CLScoreServerPost.h.


Member Function Documentation

- (id) initWithGameName: (NSString *)  name
gameKey: (NSString *)  key
delegate: (id)  delegate 

initializes a cocos server with a game name and a game key

- (BOOL) sendScore: (NSDictionary *)  dict  

send the scores to the server. A new entre will be created on the server

+ (id) serverWithGameName: (NSString *)  name
gameKey: (NSString *)  key
delegate: (id)  delegate 

creates a cocos server with a game name and a game key

- (BOOL) updateScore: (NSDictionary *)  dict  

Sends a score dictionary to the server for updating an existing entry by playername and device id, or creating a new one. The passed dictionary must contain a cc_playername key, otherwise it will raise and exception.

Since:
v0.7.1

Member Data Documentation

- (NSMutableArray*) bodyValues [protected]

values to send in the POST

Definition at line 89 of file CLScoreServerPost.h.

- (NSURLConnection*) connection_ [protected]

the connection

Definition at line 98 of file CLScoreServerPost.h.

- (id) delegate [protected]

delegate instance of fetch score

Definition at line 77 of file CLScoreServerPost.h.

- (NSString*) gameKey [protected]

game key. secret shared with the server. used to sign the values to prevent spoofing.

Definition at line 71 of file CLScoreServerPost.h.

- (NSString*) gameName [protected]

game name, used as a login name.

Definition at line 74 of file CLScoreServerPost.h.

- (CC_MD5_CTX) md5Ctx [protected]

mdt context

Definition at line 95 of file CLScoreServerPost.h.

- (tPostStatus) postStatus_ [protected]

status of the request

Definition at line 92 of file CLScoreServerPost.h.

- (NSUInteger) ranking_ [protected]

ranking

Definition at line 80 of file CLScoreServerPost.h.

- (NSMutableData*) receivedData [protected]

data received

Definition at line 86 of file CLScoreServerPost.h.

- (BOOL) scoreDidUpdate_ [protected]

score was updated

Definition at line 83 of file CLScoreServerPost.h.


Property Documentation

- (NSURLConnection*) connection [read, write, retain]

connection to the server

Definition at line 105 of file CLScoreServerPost.h.

- (tPostStatus) postStatus [read, assign]

status from the score post

Definition at line 102 of file CLScoreServerPost.h.

- (NSUInteger) ranking [read, assign]

ranking of your score

Since:
v0.7.3

Definition at line 110 of file CLScoreServerPost.h.

- (BOOL) scoreDidUpdate [read, assign]

whether or not the score was updated

Since:
v0.7.3

Definition at line 115 of file CLScoreServerPost.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone 0.99.4 API Reference - Generated using Doxygen 1.7.1