~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/history/historyitem.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
 
2
 *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
3
3
 *
4
4
 *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
5
5
 *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
43
43
const char * const HistoryItem::DISPLAY_NAME_KEY =      "display_name";
44
44
const char * const HistoryItem::PEER_NUMBER_KEY =       "peer_number";
45
45
const char * const HistoryItem::RECORDING_PATH_KEY =    "recordfile";
 
46
// FIXME: Deprecated
46
47
const char * const HistoryItem::STATE_KEY =             "state";
 
48
// New version:
 
49
const char * const HistoryItem::MISSED_KEY =            "missed";
 
50
const char * const HistoryItem::DIRECTION_KEY =         "direction";
47
51
const char * const HistoryItem::TIMESTAMP_START_KEY =   "timestamp_start";
48
52
const char * const HistoryItem::TIMESTAMP_STOP_KEY =    "timestamp_stop";
49
53
const char * const HistoryItem::AUDIO_CODEC_KEY =       "audio_codec";
103
107
void HistoryItem::print(std::ostream &o) const
104
108
{
105
109
    // every entry starts with "[" + random integer = "]"
106
 
    for (map<string, string>::const_iterator iter = entryMap_.begin();
107
 
         iter != entryMap_.end(); ++iter) {
 
110
    for (const auto &item : entryMap_) {
108
111
        // if the file does not exist anymore, we do not save it
109
 
        if (iter->first == RECORDING_PATH_KEY and not file_exists(iter->second))
110
 
            o << iter->first << "=" << "" << std::endl;
 
112
        if (item.first == RECORDING_PATH_KEY and not file_exists(item.second))
 
113
            o << item.first << "=" << "" << std::endl;
111
114
        else
112
 
            o << iter->first << "=" << iter->second << std::endl;
 
115
            o << item.first << "=" << item.second << std::endl;
113
116
    }
114
117
}
115
118