LeechCraft Azoth  0.6.70-16373-g319c272718
Modular multiprotocol IM plugin for LeechCraft
isupportlastactivity.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QtPlugin>
12 
13 namespace LC
14 {
15 namespace Azoth
16 {
18  {
19  public:
20  enum class Context
21  {
22  Activity,
24  Uptime
25  };
26 
28 
29  virtual int GetTime () const = 0;
30 
31  virtual Context GetContext () const = 0;
32  protected:
33  virtual void gotLastActivity () = 0;
34  };
35 
37  {
38  public:
39  virtual ~ISupportLastActivity () {}
40 
41  virtual QObject* RequestLastActivity (QObject *entry, const QString& variant) = 0;
42 
43  virtual QObject* RequestLastActivity (const QString& humanReadableId) = 0;
44  };
45 }
46 }
47 
48 Q_DECLARE_INTERFACE (LC::Azoth::IPendingLastActivityRequest,
49  "org.LeechCraft.Azoth.IPendingLastActivityRequest/1.0")
50 Q_DECLARE_INTERFACE (LC::Azoth::ISupportLastActivity,
51  "org.LeechCraft.Azoth.ISupportLastActivity/1.0")
virtual QObject * RequestLastActivity(QObject *entry, const QString &variant)=0
virtual Context GetContext() const =0