Пример #1
0
void TemplateActor::handleNotification(VisualNotification& aNotification)
{

    //VisualActor::handleNotification(aNotification); // debug

    VisualNotificationKey notificationKey = aNotification.getKey();

    switch (notificationKey) {

    case kStringWithIdentifierLoadedAndCreatedMsg:
        if (aNotification.getIdentifier() == this->similarArtistsStringRequestId) {
            this->handleSimilarArtistsStringCompleted();
        }
        break;

    case kAudioPlayTrackChangedEvt:
        this->createStringOfSimilarArtists();
        break;

    default:
        char notificationString[64];
        VisualNotification::convertNotificationKeyToString(notificationKey, notificationString);
        char errLog[256];
        sprintf(errLog, "Unhandled VisualNotificationKey %s in file: %s (line: %d) [%s])", notificationString, __FILE__, __LINE__, __FUNCTION__);
        writeLog(errLog);
        break;
    }

}