• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames/kggzmod

module_private.h

Go to the documentation of this file.
00001 /*
00002     This file is part of the kggzmod library.
00003     Copyright (c) 2005 - 2007 Josef Spillner <josef@ggzgamingzone.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 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     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KGGZMOD_MODULE_PRIVATE_H
00022 #define KGGZMOD_MODULE_PRIVATE_H
00023 
00024 #include <kggzmod/module.h>
00025 #include <kggzmod/player.h>
00026 
00027 #include <QtCore/QSocketNotifier>
00028 #include <QtCore/QList>
00029 
00030 class KGGZRaw;
00031 
00032 namespace KGGZMod
00033 {
00034 
00035 class ModulePrivate : public QObject
00036 {
00037     Q_OBJECT
00038     public:
00039         enum GGZEvents
00040         {
00041             msglaunch = 0,
00042             msgserver = 1,
00043             msgserverfd = 2,
00044             msgplayer = 3,
00045             msgseat = 4,
00046             msgspectatorseat = 5,
00047             msgchat = 6,
00048             msgstats = 7,
00049             msginfo = 8,
00050             msgrankings = 9
00051         };
00052 
00053         void connect();
00054         void disconnect();
00055         void sendRequest(Request request);
00056         void insertPlayer(Player::Type seattype, const QString &name, int seat);
00057         Player *findPlayer(Player::Type seattype, const QString &name);
00058         Player *self() const;
00059         QString opcodeString(GGZEvents opcode);
00060         QString requestString(Request::Type requestcode);
00061 
00062         QString m_name;
00063         int m_fd;
00064         Module::State m_state;
00065         QList<Player*> m_players;
00066         QList<Player*> m_spectators;
00067 
00068         QSocketNotifier *m_notifier;
00069         QSocketNotifier *m_gnotifier;
00070         KGGZRaw *m_net;
00071 
00072         int m_playerseats;
00073         int m_spectatorseats;
00074 
00075         int m_myseat;
00076         bool m_myspectator;
00077 
00078     public slots:
00079         void slotGGZEvent();
00080 
00081     signals:
00082         void signalEvent(const KGGZMod::Event& event);
00083         void signalError();
00084         void signalNetwork(int fd);
00085 };
00086 
00087 }
00088 
00089 #endif
00090 

libkdegames/kggzmod

Skip menu "libkdegames/kggzmod"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal