Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Network Class Reference

The Network class provides network access functionality. More...

#include </home/clem/local/src/opie/library/network.h>

Collaboration diagram for Network:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void setup ()
void load_pix ()
void draw ()
void update ()
void toasters ()
int on (int lev)

Static Public Member Functions

static void start (const QString &service=QString::null, const QString &password=QString::null)
static void stop ()
static QString settingsDir ()
static QString serviceName (const QString &service)
static QString serviceType (const QString &service)
static bool serviceNeedsPassword (const QString &service)
static void connectChoiceChange (QObject *receiver, const char *slot)
static QStringList choices (QListBox *=0, const QString &dir=QString::null)
static void writeProxySettings (Config &cfg)
static NetworkInterfaceloadPlugin (const QString &type)
static int addStateWidgets (QWidget *parent)
static void createServer (QObject *parent)
static bool networkOnline ()

Public Attributes

Picture pictures [NUM_SYS+1]
int width
int height
int units
int win
int base
int off
Computer computers [MAX_COMPUTERS]
Cable cables [MAX_COMPUTERS]
int ncables

Static Public Attributes

static const int MAX_COMPUTERS = 20
static const int NUM_SYS = 6

Detailed Description

The Network class provides network access functionality.

For internal use only.

Definition at line 30 of file network.h.


Member Function Documentation

int Network::addStateWidgets QWidget *  parent  )  [static]
 

For internal use only.

Definition at line 388 of file network.cpp.

References NetworkInterface::addStateWidget(), QValueList< T >::begin(), choices(), QValueList< T >::end(), Config::File, l, loadPlugin(), Config::readEntry(), Config::setGroup(), and type.

QStringList Network::choices QListBox *  lb = 0,
const QString dir = QString::null
[static]
 

For internal use only.

Definition at line 131 of file network.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::end(), QDir::entryList(), Config::File, QDir::filePath(), QString::isEmpty(), list, Resource::loadPixmap(), QDir::mkdir(), Config::readEntry(), Config::setGroup(), and settingsDir().

Referenced by addStateWidgets(), NetworkServer::examineNetworks(), and NetworkServer::receive().

void Network::connectChoiceChange QObject *  receiver,
const char *  slot
[static]
 

For internal use only.

Definition at line 111 of file network.cpp.

void Network::createServer QObject *  parent  )  [static]
 

For internal use only.

Definition at line 380 of file network.cpp.

Referenced by initApplication().

void Network::draw  ) 
 

Definition at line 19 of file Network.cc.

References cables, computers, Computer::draw(), Cable::draw(), i, ncables, and units.

Referenced by Game::update().

void Network::load_pix  ) 
 

Definition at line 41 of file Network.cc.

References Picture::height, height, i, Picture::load(), name, NUM_SYS, pictures, Picture::width, and width.

Referenced by Game::main().

NetworkInterface * Network::loadPlugin const QString type  )  [static]
 

For internal use only.

Definition at line 415 of file network.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), QDict< type >::find(), IID_Network, QDict< type >::insert(), qApp, QPEApplication::qpeDir(), QS_OK, and QLibrary::queryInterface().

Referenced by addStateWidgets(), NetworkServer::examineNetworks(), NetworkServer::receive(), serviceNeedsPassword(), NetworkServer::start(), and NetworkServer::stop().

bool Network::networkOnline  )  [static]
 

For internal use only.

Definition at line 372 of file network.cpp.

References NetworkServer::networkOnline().

Referenced by OpieScreenSaver::save().

int Network::on int  lev  ) 
 

Definition at line 37 of file Network.cc.

References game, MAX_COMPUTERS, and Game::MIN().

Referenced by setup().

QString Network::serviceName const QString service  )  [static]
 

For internal use only.

Definition at line 339 of file network.cpp.

References Config::File, Config::readEntry(), and Config::setGroup().

bool Network::serviceNeedsPassword const QString service  )  [static]
 

For internal use only.

Definition at line 359 of file network.cpp.

References FALSE, Config::File, loadPlugin(), NetworkInterface::needPassword(), Config::readEntry(), Config::setGroup(), and type.

QString Network::serviceType const QString service  )  [static]
 

For internal use only.

Definition at line 349 of file network.cpp.

References Config::File, Config::readEntry(), and Config::setGroup().

QString Network::settingsDir  )  [static]
 

For internal use only.

Definition at line 122 of file network.cpp.

References Global::applicationFileName().

Referenced by choices(), and writeProxySettings().

void Network::setup  ) 
 

Definition at line 4 of file Network.cc.

References base, cables, computers, game, i, Game::level, Game::MIN(), ncables, net, off, on(), Cable::setup(), Computer::setup(), units, and win.

Referenced by Game::setup_level().

void Network::start const QString choice = QString::null,
const QString password = QString::null
[static]
 

For internal use only.

Requests that the service choice be started. The password is the password to use if required.

Definition at line 63 of file network.cpp.

void Network::stop void   )  [static]
 

For internal use only.

Stops the current network service.

Definition at line 101 of file network.cpp.

void Network::toasters  ) 
 

Definition at line 29 of file Network.cc.

References computers, i, ncables, Library::OFF, OS, Computer::os, Computer::TOASTER, Computer::type, and units.

Referenced by Game::update().

void Network::update  ) 
 

Definition at line 25 of file Network.cc.

References cables, i, ncables, and Cable::update().

Referenced by Game::update().

void Network::writeProxySettings Config cfg  )  [static]
 

For internal use only.

Definition at line 79 of file network.cpp.

References Config::File, Config::readEntry(), Config::setGroup(), settingsDir(), and Config::writeEntry().

Referenced by NetworkInterface::isActive(), and NetworkServer::start().


Member Data Documentation

int Network::base
 

Definition at line 14 of file Network.h.

Referenced by Game::button_release(), setup(), Game::update(), Cable::update(), Monster::update_at(), and Game::update_info().

Cable Network::cables[MAX_COMPUTERS]
 

Definition at line 16 of file Network.h.

Referenced by Game::button_release(), draw(), setup(), and update().

Computer Network::computers[MAX_COMPUTERS]
 

Definition at line 15 of file Network.h.

Referenced by Game::button_press(), Game::button_release(), draw(), Monster::draw_at(), Monster::enter(), setup(), Computer::setup(), Cable::setup(), toasters(), Cable::update(), Monster::update_at(), and Monster::update_in().

int Network::height
 

Definition at line 12 of file Network.h.

Referenced by Computer::find_stray(), load_pix(), Computer::oncomputer(), Computer::setup(), and Cable::setup().

const int Network::MAX_COMPUTERS = 20 [static]
 

Definition at line 9 of file Network.h.

Referenced by on().

int Network::ncables
 

Definition at line 17 of file Network.h.

Referenced by Game::button_release(), draw(), setup(), toasters(), and update().

const int Network::NUM_SYS = 6 [static]
 

Definition at line 10 of file Network.h.

Referenced by load_pix(), and Computer::setup().

int Network::off
 

Definition at line 14 of file Network.h.

Referenced by Game::button_release(), setup(), Game::update(), Cable::update(), Monster::update_at(), and Game::update_info().

Picture Network::pictures[NUM_SYS+1]
 

Definition at line 11 of file Network.h.

Referenced by Computer::draw(), and load_pix().

int Network::units
 

Definition at line 13 of file Network.h.

Referenced by Game::button_release(), draw(), Monster::enter(), setup(), Cable::setup(), toasters(), Monster::update_in(), and Game::update_info().

int Network::width
 

Definition at line 12 of file Network.h.

Referenced by Monster::enter(), Computer::find_stray(), load_pix(), Computer::oncomputer(), Computer::setup(), Cable::setup(), and Monster::update_in().

int Network::win
 

Definition at line 14 of file Network.h.

Referenced by Game::button_release(), setup(), Cable::update(), Monster::update_at(), and Game::update_info().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:41:09 2005 for OPIE by  doxygen 1.4.2