The SC_UsersController requests lists of SC_User objects from the server based on a variety of different criteria:

  • User login

  • User email address

  • The local address book

  • A social provider

  • buddyhood

Basic use:
  1. 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.

  2. Set the flag that indicates whether the search should extend beyond users of the current game by calling SC_UsersController_SetSearchesGlobal().

  3. Wait for a successful server response via delegate callbacks.

  4. 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:
Other usage to load the buddy list of a user:
  1. Create an instance of UsersController, or re-use an existing instance.

  2. Call SC_UsersController_LoadBuddies() to make the server request.

  3. All the other search criteria are then ignored.

  4. Wait for notification via delegate callbacks.

  5. After a successful request, access the retrieved buddy list by using SC_User's SC_UsersController_GetUsers().

Last modified: 2013-12-23

comments powered by Disqus