2
* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
4
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
5
* Author: Alexamdre Savard <alexandre.savard@savoirfairelinux.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
* Additional permission under GNU GPL version 3 section 7:
23
* If you modify this program, or any covered work, by linking or
24
* combining it with the OpenSSL project's OpenSSL library (or a
25
* modified version of that library), containing parts covered by the
26
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
27
* grants you additional permission to convey the resulting work.
28
* Corresponding Source for a non-source form of such a combination
29
* shall include the source code for the parts of OpenSSL used as well
30
* as that of the covered work.
33
#ifndef HISTORY_ITEM_H_
34
#define HISTORY_ITEM_H_
37
#include <config/config.h>
39
typedef enum CallType {
51
* @param Timestamp start
53
* @param Timestamp stop
57
* @param Call account id
58
* @param Recording file name (if any recording were performed)
59
* @param Configuration ID
62
HistoryItem(const std::string&, CallType, const std::string&,
63
const std::string&, const std::string&, const std::string&,
64
const std::string&, const std::string&, const std::string&,
68
* Constructor from a serialized form
69
* @string contaning serialized form
71
HistoryItem(std::string="");
73
std::string get_timestamp() const {
74
return timestamp_start_;
77
bool save(Conf::ConfigTree **history);
79
std::string serialize() const;
83
* @return true if the account ID corresponds to a loaded account
85
bool valid_account(const std::string &id) const;
88
* Timestamp representing the date of the call
90
std::string timestamp_start_;
91
std::string timestamp_stop_;
94
* Represents the type of call
95
* Has be either CALL_MISSED, CALL_INCOMING or CALL_OUTGOING
100
* The information about the callee/caller, depending on the type of call.
106
* The identifier fo this item
111
* The account the call was made with
113
std::string account_id_;
116
* Whether or not a recording exist for this call
118
std::string recording_file_;
121
* The conference ID for this call (if any)
126
* Time added to conference
128
std::string timeAdded_;
132
#endif // HISTORY_ITEM