public method IO2GTableManagerListener.onStatusChanged

Brief

Processes notifications about the table manager status changes.

Declaration
C++
virtual void  onStatusChanged (O2GTableManagerStatus status, IO2GTableManager * tableManager) = 0

Parameters
status

A new status of the table manager. During the process of tables loading, the value of this parameter changes. For the list of the possible parameter values, refer to the O2GTableManagerStatus documentation.

tableManager

An instance of the table manager. The instance can be obtained by calling the IO2GSession.getTableManager or the IO2GSession.getTableManagerByAccount methods.

Details

In order to process notifications about the table manager status changes, you must create a class implementing the IO2GTableManagerListener interface and pass an instance of this class to the IO2GSession.useTableManager method.

mSession.useTableManager(O2GTableManagerMode.YES, managerListener);

For the method implementation details, see the example below.

Example

Process notifications about the table manager status changes [hide]

    // Implementation of IO2GTableManagerListener interface public method onStatusChanged
    void onStatusChanged(O2GTableManagerStatus status, IO2GTableManager *manager)
    {
        mLastStatus = status;
        switch(status)
        {
        case TablesLoaded:
            std::cout << "All tables are loaded" << std::endl;
            uni::SetEvent(mEvent);
            break;
        case TablesLoadFailed:
            std::cout << "Tables loading failed" << std::endl;
            uni::SetEvent(mEvent);
            break;
        case TablesLoading:
            break;
        }
    }

Declared in IO2GTableManagerListener

back