#import <CLScoreServerPost.h>
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 |
Handles the Score Post to the cocos live server
Definition at line 68 of file CLScoreServerPost.h.
| - (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.
- (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.
- (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] |
- (BOOL) scoreDidUpdate [read, assign] |
whether or not the score was updated
Definition at line 115 of file CLScoreServerPost.h.