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

libkdegames/kggzmod

module.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_H
00022 #define KGGZMOD_MODULE_H
00023 
00024 #include <kggzmod/request.h>
00025 #include <kggzmod/event.h>
00026 
00027 #include <QtCore/QObject>
00028 #include <QtCore/QList>
00029 
00030 #include "kggzmod_export.h"
00031 
00048 namespace KGGZMod
00049 {
00050 
00051 class ModulePrivate;
00052 class Player;
00053 
00082 class KGGZMOD_EXPORT Module : public QObject
00083 {
00084     Q_OBJECT
00085     public:
00095         Module(const QString &name);
00096         ~Module();
00097 
00105         enum State
00106         {
00107             created,    
00108             connected,  
00109             waiting,    
00110             playing,    
00111             done        
00112         };
00113 
00122         void sendRequest(Request request);
00123 
00130         QList<Player*> players() const;
00131 
00135         QList<Player*> spectators() const;
00136 
00140         State state() const;
00141 
00150         static bool isGGZ();
00151 
00158         Player *self() const;
00159 
00170         static Module *instance();
00171 
00172     signals:
00181         void signalEvent(const KGGZMod::Event& event);
00182 
00190         void signalError();
00191 
00204         void signalNetwork(int fd);
00205 
00206     private:
00207         ModulePrivate *d;
00208 };
00209 
00210 }
00211 
00212 #endif
00213 

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