00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Jussi Laitinen - jussi.laitinen@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 #ifndef NETWORKHANDLER_H 00023 #define NETWORKHANDLER_H 00024 00025 #include <QObject> 00026 00027 class NetworkHandlerPrivate; 00028 00035 class NetworkHandler : public QObject 00036 { 00037 Q_OBJECT 00038 00039 public: 00043 friend class NetworkHandlerPrivate; 00044 00050 static NetworkHandler *instance(); 00051 00052 /******************************************************************************* 00053 * MEMBER FUNCTIONS AND SLOTS 00054 ******************************************************************************/ 00055 public: 00061 void connect(); 00062 00068 void disconnect(); 00069 00075 bool isConnected(); 00076 00080 void state(); 00081 00082 protected: 00088 NetworkHandler(); 00089 00095 ~NetworkHandler(); 00096 /******************************************************************************* 00097 * SIGNALS 00098 ******************************************************************************/ 00099 signals: 00103 void connected(); 00104 00108 void disconnected(); 00109 00110 /******************************************************************************* 00111 * DATA MEMBERS 00112 ******************************************************************************/ 00113 private: 00114 static NetworkHandler *m_instance; 00115 NetworkHandlerPrivate *m_networkHandlerPrivate; 00116 }; 00117 00118 #endif // NETWORKHANDLER_H