Baloo

documentdatadb.h
1/*
2 SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef BALOO_DOCUMENTDATADB_H
8#define BALOO_DOCUMENTDATADB_H
9
10#include "engine_export.h"
11#include <lmdb.h>
12#include <QByteArray>
13#include <QMap>
14
15namespace Baloo {
16
17class BALOO_ENGINE_EXPORT DocumentDataDB
18{
19public:
20 explicit DocumentDataDB(MDB_dbi dbi, MDB_txn* txn);
21 ~DocumentDataDB();
22
23 static MDB_dbi create(MDB_txn* txn);
24 static MDB_dbi open(MDB_txn* txn);
25
26 void put(quint64 docId, const QByteArray& data);
27 QByteArray get(quint64 docId);
28
29 void del(quint64 docId);
30 bool contains(quint64 docId);
31
32 QMap<quint64, QByteArray> toTestMap() const;
33private:
34 MDB_txn* m_txn;
35 MDB_dbi m_dbi;
36};
37
38}
39
40#endif // BALOO_DOCUMENTDATADB_H
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
KIOCORE_EXPORT DeleteJob * del(const QList< QUrl > &src, JobFlags flags=DefaultFlags)
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
KIOCORE_EXPORT TransferJob * put(const QUrl &url, int permissions, JobFlags flags=DefaultFlags)
QAction * create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional< Qt::ConnectionType > connectionType=std::nullopt)
const QList< QKeySequence > & open()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.