\hypertarget{a00894}{}\doxysection{Task agent interface}
\label{a00894}\index{Task agent interface@{Task agent interface}}


\doxysubsection{ }
A mechanism for hosts to request that plug-\/ins perform tasks. 

{\itshape This interface represents an optional component that you can add to your plug-\/in in order to support extended features of the AAX SDK.}

\begin{DoxyRefDesc}{Host Compatibility Notes}
\item[\mbox{\hyperlink{a00867__compatibility_notes000002}{Host Compatibility Notes}}]This interface is not yet used in any AAX hosts\end{DoxyRefDesc}


The plug-\/in implements an \mbox{\hyperlink{a02321}{AAX\+\_\+\+ITask\+Agent}}, which is used by the host to add or cancel tasks.

The host implements \mbox{\hyperlink{a02145}{AAX\+\_\+\+IACFTask}} for task objects representing each task that it wants the plug-\/in to perform.

To request a task, the host adds a task object to the plug-\/in\textquotesingle{}s task agent interface.

The type of each task is identified with a four-\/char ID. If additional arbitrary data is necessary to describe the task it is provided via \mbox{\hyperlink{a02205}{data buffers}}.

The plug-\/in checks this data to understand what work needs to be done, then performs the task. The task may be, and usually is, executed asynchronously. The plug-\/in optionally updates the task progress as it proceedds, then calls \mbox{\hyperlink{a02317_a5206e0d8108c663131e3446e324f01d4}{AAX\+\_\+\+ITask\+::\+Set\+Done()}} when the work is completed. If the task involves returning data back to the host, the plug-\/in first calls \mbox{\hyperlink{a02317_aa8d9d069296346d40bc105a9a01fb0c1}{AAX\+\_\+\+ITask\+::\+Add\+Result()}} one or more times to provide the data via data buffers.

To be available as a task agent, the plug-\/in\textquotesingle{}s task agent implementation must be registered with the host in the plug-\/in\textquotesingle{}s Description callback like other process pointers. To add this interface to your plug-\/in at describe time, call \mbox{\hyperlink{a02233_ad1a286ef7cb869e6f79423dd774ec976}{AAX\+\_\+\+IEffect\+Descriptor\+::\+Add\+Proc\+Ptr()}} using the \mbox{\hyperlink{a00767_af0682195d377392ad356fd2b00c36892aeba711809f385408668d73d0f20d59eb}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Task\+Agent}} selector.\hypertarget{a00894_auxinterface_task_modulecommunication}{}\doxysubsection{Communicating with other modules}\label{a00894_auxinterface_task_modulecommunication}
Like other modules, the task agent interface is provided with a reference to the plug-\/in\textquotesingle{}s \mbox{\hyperlink{a02237}{AAX\+\_\+\+IEffect\+Direct\+Data}} object at initialization. In order to transfer data between a plug-\/in\textquotesingle{}s \mbox{\hyperlink{a02237}{AAX\+\_\+\+IEffect\+Direct\+Data}} object and its other objects, dedicated custom data methods in those objects\textquotesingle{} interfaces should be used. For example, to communicate with the plug-\/in\textquotesingle{}s data model, use \mbox{\hyperlink{a02049_a4728fcad006d921a07489144360f447e}{AAX\+\_\+\+IEffect\+Parameters\+::\+Get\+Custom\+Data()}} and \mbox{\hyperlink{a02049_aa838cad04781853ef2e0b9df22a05170}{AAX\+\_\+\+IEffect\+Parameters\+::\+Set\+Custom\+Data()}} . \doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{a01953}{AAX\+\_\+\+CTask\+Agent}}
\begin{DoxyCompactList}\small\item\em Default implementation of the \mbox{\hyperlink{a02321}{AAX\+\_\+\+ITask\+Agent}} interface. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{a02145}{AAX\+\_\+\+IACFTask}}
\begin{DoxyCompactList}\small\item\em Versioned interface for an asynchronous task. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{a02149}{AAX\+\_\+\+IACFTask\+Agent}}
\begin{DoxyCompactList}\small\item\em Versioned interface for a component that accepts task requests. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{a02317}{AAX\+\_\+\+ITask}}
\begin{DoxyCompactList}\small\item\em Interface representing a request to perform a task. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{a02321}{AAX\+\_\+\+ITask\+Agent}}
\begin{DoxyCompactList}\small\item\em Interface for a component that accepts task requests. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum class \mbox{\hyperlink{a00894_ga101aaf82fd3a9c6a445b5312e9551ba1}{AAX\+\_\+\+Task\+Completion\+Status}} \+: int32\+\_\+t \{ \newline
\mbox{\hyperlink{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a6adf97f83acf6453d4a6a4b1070f3754}{AAX\+\_\+\+Task\+Completion\+Status\+::\+None}} = 0
, \newline
\mbox{\hyperlink{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1af92965e2c8a7afb3c1b9a5c09a263636}{AAX\+\_\+\+Task\+Completion\+Status\+::\+Done}} = 1
, \newline
\mbox{\hyperlink{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a0e22fe7d45f8e5632a4abf369b24e29c}{AAX\+\_\+\+Task\+Completion\+Status\+::\+Canceled}} = 2
, \newline
\mbox{\hyperlink{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a902b0d55fddef6f8d651fe1035b7d4bd}{AAX\+\_\+\+Task\+Completion\+Status\+::\+Error}} = 3
 \}
\end{DoxyCompactItemize}


\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{a00894_ga101aaf82fd3a9c6a445b5312e9551ba1}\label{a00894_ga101aaf82fd3a9c6a445b5312e9551ba1}} 
\index{Task agent interface@{Task agent interface}!AAX\_TaskCompletionStatus@{AAX\_TaskCompletionStatus}}
\index{AAX\_TaskCompletionStatus@{AAX\_TaskCompletionStatus}!Task agent interface@{Task agent interface}}
\doxysubsubsection{\texorpdfstring{AAX\_TaskCompletionStatus}{AAX\_TaskCompletionStatus}}
{\footnotesize\ttfamily enum class \mbox{\hyperlink{a00894_ga101aaf82fd3a9c6a445b5312e9551ba1}{AAX\+\_\+\+Task\+Completion\+Status}} \+: int32\+\_\+t\hspace{0.3cm}{\ttfamily [strong]}}

Completion status for use with \mbox{\hyperlink{a02317_a5206e0d8108c663131e3446e324f01d4}{AAX\+\_\+\+ITask\+::\+Set\+Done()}} \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{None@{None}!Task agent interface@{Task agent interface}}\index{Task agent interface@{Task agent interface}!None@{None}}}\mbox{\Hypertarget{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a6adf97f83acf6453d4a6a4b1070f3754}\label{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a6adf97f83acf6453d4a6a4b1070f3754}} 
None&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Done@{Done}!Task agent interface@{Task agent interface}}\index{Task agent interface@{Task agent interface}!Done@{Done}}}\mbox{\Hypertarget{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1af92965e2c8a7afb3c1b9a5c09a263636}\label{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1af92965e2c8a7afb3c1b9a5c09a263636}} 
Done&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Canceled@{Canceled}!Task agent interface@{Task agent interface}}\index{Task agent interface@{Task agent interface}!Canceled@{Canceled}}}\mbox{\Hypertarget{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a0e22fe7d45f8e5632a4abf369b24e29c}\label{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a0e22fe7d45f8e5632a4abf369b24e29c}} 
Canceled&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{Error@{Error}!Task agent interface@{Task agent interface}}\index{Task agent interface@{Task agent interface}!Error@{Error}}}\mbox{\Hypertarget{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a902b0d55fddef6f8d651fe1035b7d4bd}\label{a00894_gga101aaf82fd3a9c6a445b5312e9551ba1a902b0d55fddef6f8d651fe1035b7d4bd}} 
Error&\\
\hline

\end{DoxyEnumFields}
Collaboration diagram for Task agent interface\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=341pt]{a00894}
\end{center}
\end{figure}
