AAX SDK 2.8.0
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_CTask.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2023-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
32/*================================================================================================*/
33
34#pragma once
35
36#ifndef AAX_CTask_H
37#define AAX_CTask_H
38
39#include "AAX_IACFTask.h"
40#include "CACFUnknown.h"
41
42class AAX_CTask : public AAX_IACFTask, CACFUnknown {
43public:
45 ACFMETHOD(InternalQueryInterface)(const acfIID& riid, void** ppvObjOut) AAX_OVERRIDE;
46 // CACFUnknown does not support operator=()
47 AAX_DELETE(AAX_CTask& operator=(const AAX_CTask&));
48
49 explicit AAX_CTask(AAX_CTypeID iType);
51
55 SetProgress(float iProgress) AAX_OVERRIDE;
58 AAX_OVERRIDE; // NOTE: This needs to change to non-const so that intrusive reference counting works, or
59 // implementations always need to copy all of the data out to their own objects rather than
60 // retaining this object, which also works OK.
62
63public:
64 AAX_TaskCompletionStatus Status() const { return mStatus; }
65
66private:
67 AAX_CTypeID mType{ 0 };
68 float mProgress { 0.f };
69 AAX_TaskCompletionStatus mStatus { AAX_TaskCompletionStatus::None };
70};
71
72
73#endif
#define AAX_DELETE(X)
delete keyword macro
Definition: AAX.h:174
#define AAX_DEFAULT_DTOR_OVERRIDE(X)
Definition: AAX.h:167
int32_t AAX_Result
Definition: AAX.h:347
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:346
Defines the interface representing an asynchronous task.
AAX_TaskCompletionStatus
Definition: AAX_IACFTask.h:55
Definition: AAX_ACFInterface.doxygen:229
Definition: AAX_CTask.h:42
float GetProgress() const AAX_OVERRIDE
AAX_Result SetProgress(float iProgress) AAX_OVERRIDE
AAX_TaskCompletionStatus Status() const
Definition: AAX_CTask.h:64
void **ppvObjOut AAX_OVERRIDE
Definition: AAX_CTask.h:45
AAX_IACFDataBuffer const * GetArgumentOfType(AAX_CTypeID iType) const AAX_OVERRIDE
AAX_Result SetDone(AAX_TaskCompletionStatus iStatus) AAX_OVERRIDE
Inform the host that the task is completed.
AAX_Result AddResult(AAX_IACFDataBuffer const *iResult) AAX_OVERRIDE
Attach result data to this task.
AAX_Result GetType(AAX_CTypeID *oType) const AAX_OVERRIDE
ACF_DECLARE_STANDARD_UNKNOWN() ACFMETHOD(InternalQueryInterface)(const acfIID &riid
Versioned interface for reference counted data buffers.
Definition: AAX_IACFDataBuffer.h:54
Versioned interface for an asynchronous task.
Definition: AAX_IACFTask.h:70