~ubuntu-branches/ubuntu/feisty/psi/feisty

« back to all changes in this revision

Viewing changes to src/profiles.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2002-04-19 02:28:44 UTC
  • Revision ID: james.westby@ubuntu.com-20020419022844-za7xgai5qyfd9xv6
Tags: upstream-0.8.5
ImportĀ upstreamĀ versionĀ 0.8.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
** profiles.h - deal with profiles
 
3
** Copyright (C) 2001, 2002  Justin Karneges
 
4
**
 
5
** This program is free software; you can redistribute it and/or
 
6
** modify it under the terms of the GNU General Public License
 
7
** as published by the Free Software Foundation; either version 2
 
8
** of the License, or (at your option) any later version.
 
9
**
 
10
** This program is distributed in the hope that it will be useful,
 
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
** GNU General Public License for more details.
 
14
**
 
15
** You should have received a copy of the GNU General Public License
 
16
** along with this program; if not, write to the Free Software
 
17
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
 
18
**
 
19
****************************************************************************/
 
20
 
 
21
#ifndef PROFILES_H
 
22
#define PROFILES_H
 
23
 
 
24
#include<qstring.h>
 
25
#include<qstringlist.h>
 
26
#include<qvaluelist.h>
 
27
#include"jabcommon.h"
 
28
#include"common.h"
 
29
 
 
30
 
 
31
class UserAccount
 
32
{
 
33
public:
 
34
        UserAccount();
 
35
 
 
36
        void reset();
 
37
 
 
38
        QString jid() const;
 
39
 
 
40
        QDomElement toXml(QDomDocument &, const QString &tagName);
 
41
        void fromXml(const QDomElement &);
 
42
 
 
43
        //struct Settings
 
44
        //{
 
45
                QString name;
 
46
                QString user, pass, host, resource;
 
47
                int port, priority;
 
48
                bool opt_ssl, opt_pass, opt_auto, opt_keepAlive, opt_plain, opt_log, opt_reconn;
 
49
                bool tog_offline, tog_away, tog_agents;
 
50
        //}
 
51
 
 
52
        QString olr_string;
 
53
        JabRoster roster;
 
54
};
 
55
 
 
56
typedef QValueList<UserAccount> UserAccountList;
 
57
 
 
58
 
 
59
class UserProfile
 
60
{
 
61
public:
 
62
        UserProfile();
 
63
 
 
64
        void reset();
 
65
        bool toFile(const QString &);
 
66
        bool fromFile(const QString &);
 
67
 
 
68
        QString progver;
 
69
        UserAccountList acc;
 
70
        Options prefs;
 
71
 
 
72
        QRect mwgeom;
 
73
        QString lastStatusString;
 
74
        bool useSound;
 
75
};
 
76
 
 
77
QString pathToProfile(const QString &);
 
78
QString pathToProfileConfig(const QString &);
 
79
QStringList getProfilesList();
 
80
bool profileExists(const QString &);
 
81
bool profileNew(const QString &);
 
82
bool profileRename(const QString &, const QString &);
 
83
bool profileDelete(const QString &);
 
84
 
 
85
#endif