LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
ipersistentstorageplugin.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 <memory>
12
#include <QtPlugin>
13
14
class
QByteArray;
15
21
class
IPersistentStorage
22
{
23
public
:
26
virtual
~IPersistentStorage
() {}
27
36
virtual
bool
HasKey
(
const
QByteArray& key) = 0;
37
51
virtual
QVariant
Get
(
const
QByteArray& key) = 0;
52
61
virtual
void
Set
(
const
QByteArray& key,
const
QVariant& value) = 0;
62
};
63
64
using
IPersistentStorage_ptr
= std::shared_ptr<IPersistentStorage>;
65
78
class
IPersistentStoragePlugin
79
{
80
public
:
81
virtual
~IPersistentStoragePlugin
() {}
82
88
virtual
IPersistentStorage_ptr
RequestStorage
() = 0;
89
};
90
91
Q_DECLARE_INTERFACE (
IPersistentStorage
,
"org.LeechCraft.IPersistentStorage/1.0"
)
92
Q_DECLARE_INTERFACE (
IPersistentStoragePlugin
,
"org.LeechCraft.IPersistentStoragePlugin/1.0"
)
IPersistentStorage
Provides access to a storage in an IPersistentStoragePlugin.
Definition
ipersistentstorageplugin.h:22
IPersistentStorage::HasKey
virtual bool HasKey(const QByteArray &key)=0
Checks if the given key exists in the storage.
IPersistentStorage::Set
virtual void Set(const QByteArray &key, const QVariant &value)=0
Stores the value under the given key.
IPersistentStorage::Get
virtual QVariant Get(const QByteArray &key)=0
Returns the value associated with the given key.
IPersistentStorage::~IPersistentStorage
virtual ~IPersistentStorage()
Closes this storage handle.
Definition
ipersistentstorageplugin.h:26
IPersistentStoragePlugin
Interface for plugins providing persistent (and possibly secure) storage.
Definition
ipersistentstorageplugin.h:79
IPersistentStoragePlugin::RequestStorage
virtual IPersistentStorage_ptr RequestStorage()=0
Request an proxy handle to the storage.
IPersistentStoragePlugin::~IPersistentStoragePlugin
virtual ~IPersistentStoragePlugin()
Definition
ipersistentstorageplugin.h:81
IPersistentStorage_ptr
std::shared_ptr< IPersistentStorage > IPersistentStorage_ptr
Definition
ipersistentstorageplugin.h:64
src
interfaces
ipersistentstorageplugin.h
Generated by
1.17.0