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

« back to all changes in this revision

Viewing changes to daemon/src/im/instant_messaging.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "logger.h"
34
34
#include <expat.h>
35
35
 
36
 
namespace {
37
 
void XMLCALL
 
36
static void XMLCALL
38
37
startElementCallback(void *userData, const char *name, const char **atts)
39
38
{
40
39
    if (strcmp(name, "entry"))
48
47
    static_cast<sfl::InstantMessaging::UriList *>(userData)->push_back(entry);
49
48
}
50
49
 
51
 
void XMLCALL endElementCallback(void * /*userData*/, const char * /*name*/)
 
50
static void XMLCALL
 
51
endElementCallback(void * /*userData*/, const char * /*name*/)
52
52
{}
53
 
} // end anonymous namespace
54
53
 
55
54
namespace sfl {
56
55
bool InstantMessaging::saveMessage(const std::string &message, const std::string &author, const std::string &id, int mode)
57
56
{
58
57
    std::ofstream File;
59
58
    std::string filename = "im:" + id;
60
 
    File.open(filename.c_str(), (std::_Ios_Openmode) mode);
 
59
    File.open(filename.c_str(), static_cast<std::ios_base::openmode>(mode));
61
60
 
62
61
    if (!File.good() || !File.is_open())
63
62
        return false;