SC_UsersController
The SC_UsersController requests lists of SC_User objects from the server based on a variety of different criteria:
-
User login ID
-
User email address
-
The local address book
-
A social provider
-
buddyhood
Basic use:
-
Set the match limit for the controller by using SC_UsersController_SetSearchLimit() . The search request stops returning user objects once this limit has been reached and will return only the number of matches instead. This number is limited to 999.
-
Set the flag that indicates whether the search should extend beyond users of the current game by calling SC_UsersController_SetSearchesGlobal() .
-
Make the server request by calling one of the following methods:
-
Wait for a successful server response via delegate callbacks.
-
Call SC_UsersController_GetUsers() to access the list of users that is retrieved from the server.
If the number of users matched on the server exceeds the limit set by SC_UsersController_SetSearchLimit() , the following happens:
-
Matched users will not be accessible.
-
Only the number of matched users will be accessible by using SC_UsersController_GetUsersCount() .
Other usage to load the buddy list of a user:
-
Create an instance of UsersController, or re-use an existing instance.
.