iaxaccount.h 2.52 KB
Newer Older
yanmorin's avatar
 
yanmorin committed
1
/*
2
 *  Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
3
 *  Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
yanmorin's avatar
 
yanmorin committed
4
 *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
Julien Bonjean's avatar
Julien Bonjean committed
5
 *
yanmorin's avatar
 
yanmorin committed
6
7
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 3 of the License, or
yanmorin's avatar
 
yanmorin committed
9
 *  (at your option) any later version.
Julien Bonjean's avatar
Julien Bonjean committed
10
 *
yanmorin's avatar
 
yanmorin committed
11
12
13
14
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
Julien Bonjean's avatar
Julien Bonjean committed
15
 *
yanmorin's avatar
 
yanmorin committed
16
17
18
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20
21
22
23
24
25
26
27
28
29
 *
 *  Additional permission under GNU GPL version 3 section 7:
 *
 *  If you modify this program, or any covered work, by linking or
 *  combining it with the OpenSSL project's OpenSSL library (or a
 *  modified version of that library), containing parts covered by the
 *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
 *  grants you additional permission to convey the resulting work.
 *  Corresponding Source for a non-source form of such a combination
 *  shall include the source code for the parts of OpenSSL used as well
 *  as that of the covered work.
yanmorin's avatar
 
yanmorin committed
30
31
32
33
34
 */
#ifndef IAXACCOUNT_H
#define IAXACCOUNT_H

#include "account.h"
35
#include "iaxvoiplink.h"
yanmorin's avatar
 
yanmorin committed
36
37

/**
38
 * @file: iaxaccount.h
39
 * @brief An IAX Account specify IAX specific functions and objects (IAXCall/IAXVoIPLink)
yanmorin's avatar
   
yanmorin committed
40
 */
41
class IAXAccount : public Account {
42
    public:
43
        IAXAccount(const std::string& accountID);
yanmorin's avatar
 
yanmorin committed
44

45
46
        virtual void serialize(Conf::YamlEmitter &emitter);
        virtual void unserialize(const Conf::MappingNode &map);
47

48
        void setAccountDetails(std::map<std::string, std::string> details);
49

50
        std::map<std::string, std::string> getAccountDetails() const;
51

52
        // Actually useless, since config loading is done in init()
53
        void loadConfig();
54

55
        // Register an account
56
        void registerVoIPLink();
57

58
        // Unregister an account
59
        void unregisterVoIPLink();
yanmorin's avatar
 
yanmorin committed
60

61
        std::string getPassword() const {
62
            return password_;
63
64
        }

65
    private:
66
         // Account login information: password
Tristan Matthews's avatar
Tristan Matthews committed
67
        std::string password_;
68
        IAXVoIPLink link_;
69
        virtual VoIPLink* getVoIPLink();
yanmorin's avatar
 
yanmorin committed
70
71
72
};

#endif