Interface IBrainCloudWrapper

All Known Implementing Classes:
BrainCloudWrapper

public interface IBrainCloudWrapper
  • Method Details

    • getReleasePlatform

      Platform getReleasePlatform()
    • setReleasePlatform

      void setReleasePlatform​(Platform releasePlatform)
    • getClient

      BrainCloudClient getClient()
      Returns a singleton instance of the BrainCloudClient, if this is the BrainCloudWrapper Singleton. Otherwise, return an instance of the BrainCloudClient, if this is an instance of the BrainCloudWrapper.
      Returns:
      A singleton instance of the BrainCloudClient.
    • initialize

      void initialize​(String appId, String secretKey, String appVersion)
      Method initializes the BrainCloudClient.
      Parameters:
      appId - The app id
      secretKey - The secret key for your app
      appVersion - The app version
    • initialize

      void initialize​(String appId, String secretKey, String appVersion, String serverUrl)
      Method initializes the BrainCloudClient.
      Parameters:
      appId - The app id
      secretKey - The secret key for your app
      appVersion - The app version
      serverUrl - The url to the brainCloud server
    • getStoredProfileId

      String getStoredProfileId()
      Returns the stored profile id
      Returns:
      The stored profile id
    • setStoredProfileId

      void setStoredProfileId​(String profileId)
      Sets the stored profile id
      Parameters:
      profileId - The profile id to set
    • resetStoredProfileId

      void resetStoredProfileId()
      Resets the profile id to empty string
    • setStoredAnonymousId

      void setStoredAnonymousId​(String anonymousId)
      Sets the stored anonymous id
      Parameters:
      anonymousId - The anonymous id to set
    • resetStoredAnonymousId

      void resetStoredAnonymousId()
      Resets the anonymous id to empty string
    • setAlwaysAllowProfileSwitch

      void setAlwaysAllowProfileSwitch​(boolean alwaysAllow)
      For non-anonymous authentication methods, a profile id will be passed in when this value is set to false. This will generate an error on the server if the profile id passed in does not match the profile associated with the authentication credentials. By default, this value is true.
      Parameters:
      alwaysAllow - Controls whether the profile id is passed in with non-anonymous authentications.
    • getAlwaysAllowProfileSwitch

      boolean getAlwaysAllowProfileSwitch()
      Returns the value for always allow profile switch
      Returns:
      Whether to always allow profile switches
    • authenticateAnonymous

      void authenticateAnonymous​(IServerCallback callback)
      Authenticate a user anonymously with brainCloud - used for apps that don't want to bother the user to login, or for users who are sensitive to their privacy
      Parameters:
      callback - The callback handler
    • authenticateHandoff

      void authenticateHandoff​(String handoffId, String securityToken, IServerCallback callback)
      Authenticate the user using a handoffId and an authentication token.
      Parameters:
      handoffId - braincloud handoffId generated frim cloud script
      securityToken - The authentication token
      callback - The callback handler
    • authenticateSettopHandoff

      void authenticateSettopHandoff​(String handoffCode, IServerCallback callback)
      Authenticate the user using a handoffId and an authentication token.
      Parameters:
      handoffCode - generate in cloud code
      callback - The callback handler
    • authenticateEmailPassword

      void authenticateEmailPassword​(String email, String password, boolean forceCreate, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      email - The e-mail address of the user
      password - The password of the user
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateExternal

      void authenticateExternal​(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)
      Authenticate the user via cloud code (which in turn validates the supplied credentials against an external system). This allows the developer to extend brainCloud authentication to support other backend authentication systems.

      Service Name - Authenticate Server Operation - Authenticate

      Parameters:
      userId - The user id
      token - The user token (password etc)
      externalAuthName - The name of the cloud script to call for external authentication
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateFacebook

      void authenticateFacebook​(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)
      Authenticate the user with brainCloud using their Facebook Credentials
      Parameters:
      fbUserId - The facebook id of the user
      fbAuthToken - The validated token from the Facebook SDK (that will be further validated when sent to the bC service)
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateFacebookLimited

      void authenticateFacebookLimited​(String fbLimitedUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)
      Authenticate the user with brainCloud using their FacebookLimited Credentials
      Parameters:
      fbLimitedUserId - The facebookLimited id of the user
      fbAuthToken - The validated token from the Facebook SDK (that will be further validated when sent to the bC service)
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateGoogle

      void authenticateGoogle​(String googleUserId, String googleAuthToken, boolean forceCreate, IServerCallback callback)
      Authenticate the user using a google userid(email address) and google authentication token.
      Parameters:
      googleUserId - String representation of google+ userid (email)
      googleAuthToken - The authentication token derived via the google apis.
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateGoogleOpenId

      void authenticateGoogleOpenId​(String googleOpenId, String googleAuthToken, boolean forceCreate, IServerCallback callback)
      Authenticate the user using a google userid(email address) and google authentication token.
      Parameters:
      googleOpenId - String representation of google+ userid (email)
      googleAuthToken - The authentication token derived via the google apis.
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateApple

      void authenticateApple​(String appleUserId, String token, boolean forceCreate, IServerCallback callback)
      Authenticate the user using an apple userid(email address) and apple authentication token.
      Parameters:
      appleUserId - String representation of apple userid (email)
      token - The authentication token derived via the apple apis.
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateSteam

      void authenticateSteam​(String steamUserId, String steamSessionTicket, boolean forceCreate, IServerCallback callback)
      Authenticate the user using a steam userid and session ticket (without any validation on the userid).
      Parameters:
      steamUserId - String representation of 64 bit steam id
      steamSessionTicket - The session ticket of the user (hex encoded)
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateUltra

      void authenticateUltra​(String ultraUsername, String ultraIdToken, boolean forceCreate, IServerCallback callback)
      Authenticate the user for Ultra.
      Parameters:
      ultraUsername - it's what the user uses to log into the Ultra endpoint initially
      ultraIdToken - The "id_token" taken from Ultra's JWT.
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateTwitter

      void authenticateTwitter​(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)
      Authenticate the user using a Twitter userid, authentication token, and secret from Twitter.

      Service Name - Authenticate Service Operation - Authenticate

      Parameters:
      userId - String representation of Twitter userid
      token - The authentication token derived via the Twitter apis.
      secret - The secret given when attempting to link with Twitter
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateUniversal

      void authenticateUniversal​(String userId, String userPassword, boolean forceCreate, IServerCallback callback)
      Authenticate the user using a userid and password (without any validation on the userid). Similar to AuthenticateEmailPassword - except that that method has additional features to allow for e-mail validation, password resets, etc.
      Parameters:
      userId - The e-mail address of the user
      userPassword - The password of the user
      forceCreate - Should a new profile be created for this user if the account does not exist?
      callback - The callback handler
    • authenticateAdvanced

      void authenticateAdvanced​(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)
    • reconnect

      void reconnect​(IServerCallback callback)
      Re-authenticates the user with brainCloud
      Parameters:
      callback - The callback handler
    • resetEmailPassword

      void resetEmailPassword​(String email, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      email - The e-mail address of the user
      callback - The callback handler
    • resetEmailPasswordAdvanced

      void resetEmailPasswordAdvanced​(String email, String serviceParams, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      email - The e-mail address of the user
      serviceParams - Parameters to send to the email service. see documentation for full list. http://getbraincloud.com/apidocs/apiref/#capi-mail
      callback - The callback handler
    • resetEmailPasswordWithExpiry

      void resetEmailPasswordWithExpiry​(String email, int tokenTtlInMinutes, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      email - The e-mail address of the user
      tokenTtlInMinutes - Token expiry time
      callback - The callback handler
    • resetEmailPasswordAdvancedWithExpiry

      void resetEmailPasswordAdvancedWithExpiry​(String email, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      email - The e-mail address of the user
      serviceParams - Parameters to send to the email service. see documentation for full list. http://getbraincloud.com/apidocs/apiref/#capi-mail
      tokenTtlInMinutes - Token expiry time
      callback - The callback handler
    • resetUniversalIdPassword

      void resetUniversalIdPassword​(String universalId, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      universalId - The e-mail address of the user
      callback - The callback handler
    • resetUniversalIdPasswordAdvanced

      void resetUniversalIdPasswordAdvanced​(String universalId, String serviceParams, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      universalId - The e-mail address of the user
      serviceParams - Parameters to send to the email service. see documentation for full list. http://getbraincloud.com/apidocs/apiref/#capi-mail
      callback - The callback handler
    • resetUniversalIdPasswordWithExpiry

      void resetUniversalIdPasswordWithExpiry​(String universalId, int tokenTtlInMinutes, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      universalId - The e-mail address of the user
      tokenTtlInMinutes - Token expiry time
      callback - The callback handler
    • resetUniversalIdPasswordAdvancedWithExpiry

      void resetUniversalIdPasswordAdvancedWithExpiry​(String universalId, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)
      Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).

      Note that the password sent from the client to the server is protected via SSL.

      Parameters:
      universalId - The e-mail address of the user
      serviceParams - parameters to send to the email service. see documentation for full list. http://getbraincloud.com/apidocs/apiref/#capi-mail
      tokenTtlInMinutes - Token expiry time
      callback - The callback handler
    • smartSwitchAuthenticateEmail

      void smartSwitchAuthenticateEmail​(String email, String password, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateExternal

      void smartSwitchAuthenticateExternal​(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateFacebook

      void smartSwitchAuthenticateFacebook​(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateOculus

      void smartSwitchAuthenticateOculus​(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateGoogle

      void smartSwitchAuthenticateGoogle​(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateGoogleOpenId

      void smartSwitchAuthenticateGoogleOpenId​(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateApple

      void smartSwitchAuthenticateApple​(String appleUserId, String token, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateSteam

      void smartSwitchAuthenticateSteam​(String steamUserId, String sessionTicket, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateTwitter

      void smartSwitchAuthenticateTwitter​(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateUniversal

      void smartSwitchAuthenticateUniversal​(String userId, String password, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateUltra

      void smartSwitchAuthenticateUltra​(String ultraUserId, String ultraIdToken, boolean forceCreate, IServerCallback callback)
    • smartSwitchAuthenticateAdvanced

      void smartSwitchAuthenticateAdvanced​(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)
    • runCallbacks

      void runCallbacks()
      Run callbacks, to be called once per frame from your main thread
    • serverCallback

      void serverCallback​(ServiceName serviceName, ServiceOperation serviceOperation, org.json.JSONObject jsonData)
      The serverCallback() method returns server data back to the layer interfacing with the BrainCloud library.
      Parameters:
      serviceName - - name of the requested service
      serviceOperation - - requested operation
      jsonData - - returned data from the server
    • serverError

      void serverError​(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
      Errors are returned back to the layer which is interfacing with the BrainCloud library through the serverError() callback.

      A server error might indicate a failure of the client to communicate with the server after N retries.

      Parameters:
      serviceName - - name of the requested service
      serviceOperation - - requested operation
      statusCode - The error status return code (400, 403, 500, etc)
      reasonCode - The brainCloud reason code (see reason codes on apidocs site)
      jsonError - The error json string
    • getAppStoreService

      AppStoreService getAppStoreService()
    • getAsyncMatchService

      AsyncMatchService getAsyncMatchService()
    • getAuthenticationService

      AuthenticationService getAuthenticationService()
    • getChatService

      ChatService getChatService()
    • getLobbyService

      LobbyService getLobbyService()
    • getDataStreamService

      DataStreamService getDataStreamService()
    • getEntityService

      EntityService getEntityService()
    • getEventService

      EventService getEventService()
    • getFileService

      FileService getFileService()
    • getFriendService

      FriendService getFriendService()
    • getGamificationService

      GamificationService getGamificationService()
    • getGlobalAppService

      GlobalAppService getGlobalAppService()
    • getGlobalEntityService

      GlobalEntityService getGlobalEntityService()
    • getGlobalStatisticsService

      GlobalStatisticsService getGlobalStatisticsService()
    • getGroupService

      GroupService getGroupService()
    • getGroupFileService

      GroupFileService getGroupFileService()
    • getIdentityService

      IdentityService getIdentityService()
    • getMailService

      MailService getMailService()
    • getMessagingService

      MessagingService getMessagingService()
    • getMatchMakingService

      MatchMakingService getMatchMakingService()
    • getOneWayMatchService

      OneWayMatchService getOneWayMatchService()
    • getPlaybackStreamService

      PlaybackStreamService getPlaybackStreamService()
    • getPlayerStateService

      PlayerStateService getPlayerStateService()
    • getPlayerStatisticsService

      PlayerStatisticsService getPlayerStatisticsService()
    • getPlayerStatisticsEventService

      PlayerStatisticsEventService getPlayerStatisticsEventService()
    • getPresenceService

      PresenceService getPresenceService()
    • getVirtualCurrencyService

      VirtualCurrencyService getVirtualCurrencyService()
    • getProfanityService

      ProfanityService getProfanityService()
    • getPushNotificationService

      PushNotificationService getPushNotificationService()
    • getRedemptionCodeService

      RedemptionCodeService getRedemptionCodeService()
    • getRelayService

      RelayService getRelayService()
    • getRTTService

      RTTService getRTTService()
    • getS3HandlingService

      S3HandlingService getS3HandlingService()
    • getScriptService

      ScriptService getScriptService()
    • getSocialLeaderboardService

      SocialLeaderboardService getSocialLeaderboardService()
    • getLeaderboardService

      SocialLeaderboardService getLeaderboardService()
    • getTimeService

      TimeService getTimeService()
    • getTournamentService

      TournamentService getTournamentService()
    • getGlobalFileService

      GlobalFileService getGlobalFileService()
    • getCustomEntityService

      CustomEntityService getCustomEntityService()
    • getItemCatalogService

      ItemCatalogService getItemCatalogService()
    • getUserItemsService

      UserItemsService getUserItemsService()