Platform Abstraction Layer initialization data.


typedef struct  {
    int currentVersion ;
    int minimumRequiredVersion ;
    SC_LogWriter_t logWriter ;
    SC_RunLoopType_t runLoopType ;
    unsigned int eventDomain ;
    SC_EventNotifier_t eventNotifier ;
    struct PAL_DispatchQueue_tag * mainDispatchQueue ;
    const char * clientType ;
    void * eventNotifierContext ;


BlackBerry 10.0.0

Deprecated in BlackBerry 10.3.0


int currentVersion
This required field must be set to SC_INIT_CURRENT_VERSION when initializing.

On return of the client initialization, it will be set to the maximum version the library supported

int minimumRequiredVersion
This required field must be set to the minimum version containing all fields absolutely required to run the application, e.g.

SC_INIT_VERSION_1_0. If the library does not support that version, SC_Client_New will fail

SC_LogWriter_t logWriter
Set the method used to write out log messages.

By default, log messages are written to stdout. If you want to write the log messages to some other place, set this field to a method with the correct signature instead.

SC_RunLoopType_t runLoopType
This required field must be set to either SC_RUN_LOOP_TYPE_BPS, when you use BPS or SC_RUN_LOOP_TYPE_CUSTOM, when you use a custom run loop.

Note that the thread where your run loop is hosted is the thread all API calls will have to be issued as well as all callbacks will take place.

unsigned int eventDomain
If you use the run loop type SC_RUN_LOOP_TYPE_BPS, you assign the event domain to be used by Scoreloop via this field.

If you set this field to 0, Scoreloop will pick a domain for you. After the creation of a SC_Client object this field will then contain the domain picked by Scoreloop. You can use the utility method SC_GetBPSEventDomain() instead to query this field.

SC_EventNotifier_t eventNotifier
If you use the run loop type SC_RUN_LOOP_TYPE_CUSTOM, you can specify a method here which gets called to indicate that you should call SC_HandleCustomEvent soon.

Note that this method gets called on a different thread than the scoreloop thread on which you have to call SC_HandleCustomEvent. This is an advanced feature and should only be used if you understand the threading implications.

struct PAL_DispatchQueue_tag * mainDispatchQueue

Should be left NULL.

const char * clientType
Type of the client's application (optional).

NULL for a game.

void * eventNotifierContext
Some arbitrary void pointer that gets passed to invocations of the event notifier.

You have to take care of memory management of this pointer by yourself. This context is undefined if not set explicitly.


libscoreloopcore (For the qcc command, use the -l scoreloopcore option to link against this library)


Please make sure sizeof( SC_InitData_t ) gets initialized to \0 e.g. with memset or calloc - or call SC_InitData_Init instead.

Note that initializing SC_InitData_t this way is new and required on the QNX platform. If you port a Scoreloop enabled game from another platform you have take these changes into account.

Last modified: 2014-06-24

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus