00001 /****************************************************************************** 00002 * This file is part of the Gluon Development Platform 00003 * Copyright (C) 2010 Shantanu Tushar <jhahoneyk@gmail.com> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00020 #ifndef ATTICAMANAGER_H 00021 #define ATTICAMANAGER_H 00022 00023 #include <core/singleton.h> 00024 00025 #include <attica/providermanager.h> 00026 00027 namespace GluonPlayer 00028 { 00039 class AtticaManager : public GluonCore::Singleton<AtticaManager> 00040 { 00041 Q_OBJECT 00042 00043 public: 00048 bool isProviderValid(); 00053 Attica::Provider provider(); 00054 00055 private: 00056 friend class GluonCore::Singleton<AtticaManager>; 00057 AtticaManager(); 00058 ~AtticaManager(); 00059 Q_DISABLE_COPY( AtticaManager ) 00060 00061 Attica::ProviderManager m_manager; 00062 Attica::Provider m_provider; 00063 00064 private slots: 00065 void providersUpdated(); 00066 00067 signals: 00071 void gotProvider(); 00075 void failedToFetchProvider(); 00076 }; 00077 } 00078 00079 #endif // ATTICAMANAGER_H