~ubuntu-branches/ubuntu/jaunty/quassel/jaunty

« back to all changes in this revision

Viewing changes to src/common/network.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2009-01-14 01:28:49 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090114012849-38celzez3y3wpai9
Tags: 0.4.0~git090113-0ubuntu1
* New upstream git snapshot
  - Use networks.ini to provide default network/channel
  - Provide presets for common IRC networks
* Add kubuntu_01_default_network_channel.patch to set Freenode, port
  8001, and #kubuntu as defaults
* Add build-dep on quilt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *   Copyright (C) 2005-08 by the Quassel Project                          *
 
2
 *   Copyright (C) 2005-09 by the Quassel Project                          *
3
3
 *   devel@quassel-irc.org                                                 *
4
4
 *                                                                         *
5
5
 *   This program is free software; you can redistribute it and/or modify  *
203
203
  inline bool autoAwayActive() const { return _autoAwayActive; }
204
204
  inline void setAutoAwayActive(bool active) { _autoAwayActive = active; }
205
205
 
 
206
  static QStringList presetNetworks(bool onlyDefault = false);
 
207
  static QStringList presetDefaultChannels(const QString &networkName);
 
208
  static NetworkInfo networkInfoFromPreset(const QString &networkName);
 
209
 
206
210
public slots:
207
211
  void setNetworkName(const QString &networkName);
208
212
  void setCurrentServer(const QString &currentServer);
350
354
 
351
355
  bool _autoAwayActive; // when this is active handle305 and handle306 don't trigger any output
352
356
 
 
357
  static QString _networksIniPath;
 
358
 
353
359
  friend class IrcUser;
354
360
  friend class IrcChannel;
355
361
};
356
362
 
357
363
//! Stores all editable information about a network (as opposed to runtime state).
358
364
struct NetworkInfo {
 
365
  // set some default values, note that this does not initialize e.g. name and id
 
366
  NetworkInfo();
 
367
 
359
368
  NetworkId networkId;
360
369
  QString networkName;
361
370
  IdentityId identity;
365
374
  QByteArray codecForEncoding;
366
375
  QByteArray codecForDecoding;
367
376
 
368
 
  // Server entry: QString "Host", uint "Port", QString "Password", bool "UseSSL"
369
377
  Network::ServerList serverList;
370
378
  bool useRandomServer;
371
379