SC_HandleBPSEvent()

Continue processing of Scoreloop code when using SC_RUN_LOOP_TYPE_BPS.

Synopsis:

#include <scoreloop/sc_init.h>
 
SC_DEPRECATED SC_PUBLISHED int SC_HandleBPSEvent(SC_InitData_t *initData, bps_event_t *event)

Since:

BlackBerry 10.0.0

Deprecated in BlackBerry 10.3.0

Arguments:

initData

A pointer to the init data

event

The BPS event to handle

Library:

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

Description:

You have to call this method at the beginning of your BPS event loop, so that Scoreloop can continue its processing of asynchronous message receives from the servers. Your event loop should look like this:

 for (;;) {
      // Get next event
      bps_event_t *event;
      bps_get_event(&event, -1);

      if (bps_event_get_domain(event) == SC_GetBPSEventDomain(&initData)) {
          SC_HandleBPSEvent(&initData, event);
      }
      ...
 }

Returns:

BPS_SUCCESS if it was a Scoreloop event, BPS_FAILURE otherwise

Last modified: 2014-06-24



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

comments powered by Disqus