Static Public Member Functions

OFCurrentUser Class Reference

#import <OFCurrentUser.h>

List of all members.

Static Public Member Functions

(void) + setDelegate:
(OFUser *) + currentUser
(OFRequestHandle *) + favoriteCurrentGame:
(OFRequestHandle *) + sendFriendRequest:
(OFRequestHandle *) + unfriend:
(OFRequestHandle *) + checkConnectedToSocialNetwork
(BOOL) + hasFriends
(NSInteger) + unviewedChallengesCount
(BOOL) + allowsAutoSocialNotifications
(NSInteger) + OpenFeintBadgeCount

Detailed Description

The public interface for OFCurrentUser lets to query and manipulate certain properties of the current user.


Member Function Documentation

+ (BOOL) allowsAutoSocialNotifications

Whether or not the current user allows social notifications to be posted automatically.

Returns:
BOOL YES if the current user allows social notifications
+ (OFRequestHandle*) checkConnectedToSocialNetwork

Tells whether the current player has connected their OpenFeint Account to any social network

Returns:
OFRequestHandle for the server request. User this to cancel the request
Note:
Invokes
+ (OFUser*) currentUser

Get the current user.

Returns:
OFUser* The current User Object.
+ (OFRequestHandle*) favoriteCurrentGame: (NSString *)  reviewText

Make this game a favorite of the current user. The review text is optional.

Parameters:
reviewTextReview text for the this game that the user just favorited. This is optional. Pass nil to ignore.
Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didFavoriteCurrentGame on success and
  • (void)didFailFavoriteCurrentGame on failure.
+ (BOOL) hasFriends

Whether or not the current user has OpenFeint friends

Returns:
BOOL YES if the current user has OpenFeint friends
+ (NSInteger) OpenFeintBadgeCount

How many things are waiting for this user in OpenFeint Dashboard.

Returns:
uint returns pending friends + unview challenges + new inbox items.
+ (OFRequestHandle*) sendFriendRequest: (OFUser *)  user

Make the current user start following another user

Parameters:
useruser to follow
Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Inovkes - (void)didSendFriendRequest on success and
  • (void)didFailSendFriendRequest on failure. These function are part of the OFUserDelegate protocol
+ (void) setDelegate: (id< OFCurrentUserDelegate >)  delegate

Set a delegate for all OFCurrentUser related actions. Must adopt the OFCurrentUserDelegate protocol.

Note:
Defaults to nil. Weak reference
+ (OFRequestHandle*) unfriend: (OFUser *)  user

Make the current user stop following another user

Parameters:
useruser to stop following
Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didUnfriend on success and
  • (void)didFailUnfriend on failure
+ (NSInteger) unviewedChallengesCount

The number of unviewed Challenges by the current user.

Returns:
uint The number of unview Challenges by the current user.

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