LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
ihookproxy.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#ifndef INTERFACES_CORE_IHOOKPROXY_H
10#define INTERFACES_CORE_IHOOKPROXY_H
11#include <memory>
12#include <QMetaType>
13
14class QVariant;
15class QByteArray;
16
17namespace LC
18{
53 class Q_DECL_EXPORT IHookProxy
54 {
55 public:
56 virtual ~IHookProxy () {}
57
62 virtual void CancelDefault () = 0;
63
68 virtual const QVariant& GetReturnValue () const = 0;
69
77 virtual void SetReturnValue (const QVariant& value) = 0;
78
90 virtual QVariant GetValue (const QByteArray& name) const = 0;
91
105 virtual void SetValue (const QByteArray& name, const QVariant& value) = 0;
106 };
107
108 typedef std::shared_ptr<IHookProxy> IHookProxy_ptr;
109}
110
112
113#endif
Class for hook-based communication between plugins.
Definition ihookproxy.h:54
virtual void SetReturnValue(const QVariant &value)=0
Sets the "return value" of this hook chain.
virtual void CancelDefault()=0
Cancels default handler of the event.
virtual ~IHookProxy()
Definition ihookproxy.h:56
virtual QVariant GetValue(const QByteArray &name) const =0
Returns the value of the given parameter.
virtual void SetValue(const QByteArray &name, const QVariant &value)=0
Updates the value of the given parameter.
virtual const QVariant & GetReturnValue() const =0
Returns the current "return value" of this hook call chain.
Definition constants.h:15
std::shared_ptr< IHookProxy > IHookProxy_ptr
Definition ihookproxy.h:108
Q_DECLARE_METATYPE(QVariantList *)