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

Nepomuk-Core

  • KTp
contact.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2012 David Edmundson <kde@davidedmundson.co.uk>
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_CONTACT_H
20 #define KTP_CONTACT_H
21 
22 #include <QVariant>
23 #include <TelepathyQt/Contact>
24 #include <KTp/presence.h>
25 #include <KTp/ktp-export.h>
26 
27 
28 namespace KTp{
29 class KTP_EXPORT Contact : public Tp::Contact
30 {
31  Q_OBJECT
32 public:
33  explicit Contact(Tp::ContactManager *manager, const Tp::ReferencedHandles &handle, const Tp::Features &requestedFeatures, const QVariantMap &attributes);
34 
35  KTp::Presence presence() const;
36 
37 
39  bool audioCallCapability() const;
41  bool videoCallCapability() const;
43  bool fileTransferCapability() const;
44 
45  //Overridden as a workaround for upstream bug https://bugs.freedesktop.org/show_bug.cgi?id=55883
46  QStringList clientTypes() const;
48  QPixmap avatarPixmap();
49 
50 Q_SIGNALS:
51  void invalidated();
52 
53 private Q_SLOTS:
54  void invalidateAvatarCache();
55 
56 private:
57  void avatarToGray(QPixmap &avatar);
58  QString keyCache() const;
59  QString buildAvatarPath(const QString &avatarToken);
60 
61 };
62 
63 
64 typedef Tp::SharedPtr<KTp::Contact> ContactPtr;
65 
66 }//namespace
67 
68 // Q_DECLARE_METATYPE(KTp::ContactPtr)
69 
70 #endif // CONTACT_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