• Skip to content
  • Skip to link menu
  • KDE API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • KTp
logs-importer-private.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Dan Vrátil <dvratil@redhat.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef KTP_LOGSIMPORTER_PRIVATE_H
20 #define KTP_LOGSIMPORTER_PRIVATE_H
21 
22 #include <QThread>
23 #include <QStringList>
24 #include <QDomDocument>
25 #include <KDateTime>
26 
27 #include "logs-importer.h"
28 
29 namespace KTp {
30 
31 class LogsImporter::Private: public QThread
32 {
33  Q_OBJECT
34 
35  public:
36  Private(LogsImporter* parent);
37  ~Private();
38 
39  void setAccountId(const QString &accountId);
40  QStringList findKopeteLogs(const QString &accountId) const;
41 
42  Q_SIGNALS:
43  void error(const QString &error);
44 
45  protected:
46  virtual void run();
47 
48  private:
49 
50  QString accountIdToProtocol(const QString &accountId) const;
51  QString accountIdToAccountName(const QString &accountId) const;
52 
53  void initKTpDocument();
54  void saveKTpDocument();
55  KDateTime parseKopeteTime(const QDomElement &kopeteMessage) const;
56  QDomElement convertKopeteMessage(const QDomElement &kopeteMessage);
57  void convertKopeteLog(const QString &filepath);
58 
59  QString m_accountId;
60  QString m_meId;
61  QString m_contactId;
62 
63  QDomDocument m_ktpDocument;
64  QDomDocument m_kopeteDocument;
65  QDomElement m_ktpLogElement;
66 
67  int m_day;
68  int m_month;
69  int m_year;
70 
71  bool m_isMUCLog;
72 
73  friend class KTp::LogsImporter;
74 };
75 
76 } /* namespace KTp */
77 
78 #endif // KTP_LOGSIMPORTER_PRIVATE_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Mar 22 2013 10:58:52 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktp-common-internals API Reference

Skip menu "ktp-common-internals API Reference"
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal