1/* -*- C++ -*-
2 The detailed API for Weavers in ThreadWeaver.
3
4 SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <mirko@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef QUEUEAPI_H
10#define QUEUEAPI_H
11
12#include "jobpointer.h"
13#include "queuesignals.h"
14#include "state.h"
15#include "weaverinterface.h"
16
17namespace ThreadWeaver
18{
19class QueueAPI : public QueueSignals, public WeaverInterface
20{
21 Q_OBJECT
22
23public:
24 explicit QueueAPI(QObject *parent = nullptr);
25 explicit QueueAPI(ThreadWeaver::Private::QueueSignals_Private *d, QObject *parent = nullptr);
26
27 virtual void shutDown_p() = 0;
28 const State *state() const override = 0;
29 virtual State *state() = 0;
30 virtual void setMaximumNumberOfThreads_p(int cap) = 0;
31 virtual int maximumNumberOfThreads_p() const = 0;
32 virtual int currentNumberOfThreads_p() const = 0;
33 virtual bool dequeue_p(JobPointer) = 0;
34 virtual void dequeue_p() = 0;
35 virtual void finish_p() = 0;
36 virtual void suspend_p() = 0;
37 virtual void resume_p() = 0;
38 virtual bool isEmpty_p() const = 0;
39 virtual bool isIdle_p() const = 0;
40 virtual int queueLength_p() const = 0;
41 virtual void requestAbort_p() = 0;
42};
43
44}
45
46#endif // QUEUEAPI_H
47

source code of threadweaver/src/queueapi.h