QSpotifySession::QSpotifySession() : QObject(0) , m_timerID(0) , m_sp_session(nullptr) , m_connectionStatus(LoggedOut) , m_connectionError(Ok) , m_connectionRules(AllowSyncOverWifi | AllowNetworkIfRoaming) , m_streamingQuality(Unknown) , m_syncQuality(Unknown) , m_syncOverMobile(false) , m_user(nullptr) , m_pending_connectionRequest(false) , m_isLoggedIn(false) , m_explicitLogout(false) , m_aboutToQuit(false) , m_offlineMode(false) , m_forcedOfflineMode(false) , m_ignoreNextConnectionError(false) , m_playQueue(new QSpotifyPlayQueue(this)) , m_currentTrack(nullptr) , m_isPlaying(false) , m_currentTrackPosition(0) , m_currentTrackPlayedDuration(0) , m_previousTrackRemaining(0) , m_shuffle(false) , m_repeat(false) , m_repeatOne(false) , m_volumeNormalize(true) , m_trackChangedAutomatically(false) { m_networkingStatus = new ubuntu::connectivity::NetworkingStatus(this); connect(m_networkingStatus, SIGNAL(statusChanged(Status)), this, SLOT(onOnlineChanged())); connect(m_networkingStatus, SIGNAL(statusChanged(Status)), this, SIGNAL(isOnlineChanged())); connect(m_networkingStatus, SIGNAL(limitationsChanged()), this, SLOT(configurationChanged())); QCoreApplication::setOrganizationName("CuteSpotify"); QCoreApplication::setOrganizationDomain("com.mikeasoft.cutespotify"); QCoreApplication::setApplicationName("CuteSpotify"); connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(initiateQuit())); m_audioThread = new QThread(); g_audioWorker = new QSpotifyAudioThreadWorker(); g_audioWorker->moveToThread(m_audioThread); connect(m_audioThread, SIGNAL(finished()), g_audioWorker, SLOT(deleteLater())); connect(m_audioThread, SIGNAL(finished()), m_audioThread, SLOT(deleteLater())); m_audioThread->start(QThread::HighestPriority); // QCoreApplication::instance()->installEventFilter(this); }
void LinkDoodService::initConnects() { qDebug() << Q_FUNC_INFO ; QObject::connect(m_pChatObserver.get(),SIGNAL(avatarChangedBack(int64,QString)),this, SLOT(onChatAvatarChanged(int64,QString))); QObject::connect(m_pChatObserver.get(),SIGNAL(offlineMsgNoticeBack(IMOfflineMsgList)),this, SLOT(onChatOfflineMsgNotice(IMOfflineMsgList))); QObject::connect(m_pChatObserver.get(),SIGNAL(sendMessageBack(bool,int64,int64)),this, SLOT(onChatSendMessageResult(bool,int64,int64))); QObject::connect(m_pChatObserver.get(),SIGNAL(getMessagesBack(bool,int64,MsgList)),this, SLOT(onChatGetMessagesResult(bool,int64,MsgList))); QObject::connect(m_pChatObserver.get(),SIGNAL(removeChatBack(bool)),this, SLOT(onChatRemoveChatResult(bool))); QObject::connect(m_pChatObserver.get(),SIGNAL(chatMessageNotice(Msg)),this, SLOT(onChatMessageNotice(Msg))); QObject::connect(m_pChatObserver.get(),SIGNAL(sessionMessageNotice(QString,QString,QString,QString,QString,QString,QString)),this, SLOT(onSessionMessageNotice(QString,QString,QString,QString, QString,QString,QString))); QObject::connect(m_pChatObserver.get(),SIGNAL(deleteMessagesBack(int)),this, SLOT(onChatDeleteMessagesResult(int))); QObject::connect(m_pChatObserver.get(), SIGNAL(uploadAvatarBack(std::string,std::string,int)), this, SLOT(onChatUploadAvatar(QString,QString,int))); QObject::connect(m_pChatObserver.get(), SIGNAL(uploadFileBack(std::string,std::string,int)), this, SLOT(onChatUploadFile(QString,QString,int))); QObject::connect(m_pChatObserver.get(), SIGNAL(fileProgressBack(std::string,std::string,int)), this, SLOT(onChatFileProgress(QString,QString,int))); QObject::connect(m_pChatObserver.get(), SIGNAL(downloadFileBack(std::string,std::string,int)), this, SLOT(onChatDownloadFile(QString,QString,int))); QObject::connect(m_pChatObserver.get(), SIGNAL(uploadImageBack(std::string,std::string,int)), this, SLOT(onChatupLoadImage(QString,QString,int))); QObject::connect(m_pChatObserver.get(), SIGNAL(downloadImageBack(std::string,std::string,int)), this, SLOT(onChatDownloadImage(QString,QString,int))); QObject::connect(m_pChatObserver.get(), SIGNAL(getFileListBack(std::string,std::string,int)), this, SLOT(onChatGetFileList(QString,QString,int))); QObject::connect(m_pEnterpriseControler.get(),SIGNAL(getSonOrgsResult(int ,OrgList ,OrgUserList )),this, SLOT(onGetSonOrgsResult(int,OrgList,OrgUserList ))); QObject::connect(m_pEnterpriseControler.get(),SIGNAL(getOnlineStatesResult(QOnlineStateList)),this, SLOT(onGetOnlineStatesResult(QOnlineStateList))); QObject::connect(m_pEnterpriseControler.get(),SIGNAL(getOrgUserInfoResult(int,OrgUser)),this, SLOT(onGetorgUserInfoResult(int,OrgUser))); QObject::connect(m_pAuth.get(),SIGNAL(getLoginHistoryResult(LoginInfoList)),this, SLOT(onGetLoginHistoryResult(LoginInfoList))); QObject::connect(m_pAuth.get(),SIGNAL(loginSucceeded()),this, SLOT(onLoginSucceeded())); QObject::connect(m_pAuth.get(),SIGNAL(loginFailed(int)),this, SLOT(onLoginFailed(int))); QObject::connect(m_pAuth.get(),SIGNAL(loginoutRelust(bool)),this, SLOT(onLoginoutRelust(bool))); QObject::connect(m_pAuth.get(),SIGNAL(loginResultObserver(int,QString)),this, SLOT(onLoginResultObserver(int,QString))); QObject::connect(m_pAuth.get(),SIGNAL(accountInfoChanged(Contact)),this, SLOT(onAccountInfoChanged(Contact))); QObject::connect(m_pChatObserver.get(),SIGNAL(chatListChanged(Chat_UIList)),this, SLOT(onChatListChanged(Chat_UIList))); QObject::connect(m_pContactObserver.get(),SIGNAL(contactListChanged(int,ContactList)),this, SLOT(onContactListChanged(int,ContactList))); QObject::connect(m_pContactObserver.get(),SIGNAL(contactInfoChanged(int,Contact)),this, SLOT(onContactInfoChanged(int,Contact))); QObject::connect(m_pContactObserver.get(),SIGNAL(contactOnlineChanged(QString,QString)),this,SLOT(onOnlineChanged(QString,QString))); }