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

OFUser Class Reference

#import <OFUser.h>

List of all members.

Public Member Functions

(OFRequestHandle *) - getFriends
(OFRequestHandle *) - getFriendsWithThisApplication
(OFRequestHandle *) - getProfilePicture
(id) - initWithLocalSQL:
(id) - initWithCoder:
(void) - encodeWithCoder:
(bool) - isLocalUser
(void) - adjustGamerscore:
(void) - changeProfilePictureUrl:facebook:twitter:uploaded:
(void) - setName:
(void) - setFollowedByLocalUser:

Static Public Member Functions

(void) + setDelegate:
(OFRequestHandle *) + getUser:
(id) + invalidUser
(NSString *) + getResourceName

Protected Attributes

package NSString * name
OFPointer< OFHttpService > mHttpService
OFPointer
< OFImageViewHttpServiceObserver > 
mHttpServiceObserver

Properties

NSString * name
NSString * lastPlayedGameId
NSString * lastPlayedGameName
NSUInteger gamerScore
BOOL followsLocalUser
BOOL followedByLocalUser
BOOL online
NSString * userId
NSString * profilePictureUrl
NSString * profilePictureSource
BOOL usesFacebookProfilePicture
double latitude
double longitude

Detailed Description

The public interface for OFUser let you query friends, manipulate the friends of the current user, and query options on the current user. Note that Friends are people which you have sent a friend invite to or accepted a friend invite from. This means as soon as you friend request someone they are immediately your friend, the other party does not need to accept the friend request before they are your friend.


Member Function Documentation

- (void) adjustGamerscore: (int)  gamerscoreAdjustment
- (void) changeProfilePictureUrl: (NSString *)  url
facebook: (BOOL)  isFacebook
twitter: (BOOL)  isTwitter
uploaded: (BOOL)  isUploaded 
- (void) encodeWithCoder: (NSCoder *)  aCoder
- (OFRequestHandle*) getFriends

Get the users which this user follows

Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didGetFriends:(NSArray*)follows OFUser:(OFUser*)user on success and
  • (void)didFailGetFriendsOFUser:(OFUser*)user on failure
- (OFRequestHandle*) getFriendsWithThisApplication

Get the users which this user follows who also have this application.

Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didGetFriendsWithThisApplication:(NSArray*)follows OFUser:(OFUser*)user on success and
  • (void)didFailGetFriendsWithThisApplicationOFUser:(OFUser*)user on failure
- (OFRequestHandle*) getProfilePicture

Get the profile picture for the OFUser

Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didGetProfilePicture:(UIImage*)image OFUser:(OFUser*)user; on success and
  • (void)didFailGetProfilePictureOFUser:(OFUser*)user; on failure.
+ (NSString*) getResourceName
+ (OFRequestHandle*) getUser: (NSString *)  userId

Get a user by their userId

Parameters:
userIdThe user Id of the user you wish to get
Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didGetUser:(OFUser*)user; on success and
  • (void)didFailGetUser; on failure
- (id) initWithCoder: (NSCoder *)  aDecoder
- (id) initWithLocalSQL: (OFSqlQuery *)  queryRow
+ (id) invalidUser
- (bool) isLocalUser
+ (void) setDelegate: (id< OFUserDelegate >)  delegate

Set a delegate for all OFUser related actions. Must adopt the OFUserDelegate protocol.

Note:
Defaults to nil. Weak reference
- (void) setFollowedByLocalUser: (BOOL)  value
- (void) setName: (NSString *)  value

Member Data Documentation

- (OFPointer<OFHttpService>) mHttpService [protected]
- (OFPointer<OFImageViewHttpServiceObserver>) mHttpServiceObserver [protected]
- (package NSString*) name [protected]

Property Documentation

- (BOOL) followedByLocalUser [read, assign]

YES if the current user follows this user

- (BOOL) followsLocalUser [read, assign]

YES if this user follows the current user

- (NSUInteger) gamerScore [read, assign]

Gamer Score of this user

- (NSString *) lastPlayedGameId [read, assign]

Application Id of the last game played

- (NSString *) lastPlayedGameName [read, assign]

Name of the last game played.

- (double) latitude [read, assign]
- (double) longitude [read, assign]
- (NSString*) name [read, assign]

Name of this User

- (BOOL) online [read, assign]

YES if this user is currently online.

- (NSString *) profilePictureSource [read, retain]
- (NSString *) profilePictureUrl [read, retain]
- (NSString*) userId [read, assign]

User id associated with this user.

- (BOOL) usesFacebookProfilePicture [read, assign]

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