\section{KDCOPAction\-Proxy Class Reference}
\label{classKDCOPActionProxy}\index{KDCOPActionProxy@{KDCOPActionProxy}}
The KDCOPAction\-Proxy class provides an easy way to publish a collection of {\bf KAction}{\rm (p.\,\pageref{classKAction})} objects through DCOP. A proxy class publishing a DCOP interface for actions.  


{\tt \#include $<$kdcopactionproxy.h$>$}

Inheritance diagram for KDCOPAction\-Proxy:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=75pt]{classKDCOPActionProxy__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KDCOPAction\-Proxy:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=75pt]{classKDCOPActionProxy__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KDCOPAction\-Proxy} ({\bf KAction\-Collection} $\ast$action\-Collection, {\bf DCOPObject} $\ast$parent)
\begin{CompactList}\small\item\em Constructs a dcop action proxy, being able to export the actions of the provided {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} through DCOP, using the parent DCOPObject's object id to generate unique object ids for the actions. \item\end{CompactList}\item 
{\bf KDCOPAction\-Proxy} ({\bf DCOPObject} $\ast$parent)
\begin{CompactList}\small\item\em Use this constructor if do not want to provide the exportable actions through a {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} . \item\end{CompactList}\item 
{\bf $\sim$KDCOPAction\-Proxy} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual {\bf QValue\-List}$<$ {\bf KAction} $\ast$ $>$ {\bf actions} () const 
\begin{CompactList}\small\item\em Returns a list of exportable actions. \item\end{CompactList}\item 
virtual {\bf KAction} $\ast$ {\bf action} (const  char $\ast$name) const 
\begin{CompactList}\small\item\em Returns an action object with the given name. \item\end{CompactList}\item 
virtual {\bf QCString} {\bf action\-Object\-Id} (const  {\bf QCString} \&name) const 
\begin{CompactList}\small\item\em Use this method to retrieve a DCOP object id for an action with the given name. \item\end{CompactList}\item 
virtual {\bf QMap}$<$ {\bf QCString}, {\bf DCOPRef} $>$ {\bf action\-Map} (const  {\bf QCString} \&app\-Id={\bf QCString}()) const 
\begin{CompactList}\small\item\em Returns a map of all exported actions, with the action name as keys and a global DCOP reference as data entries. \item\end{CompactList}\item 
virtual bool {\bf process} (const  {\bf QCString} \&obj, const  {\bf QCString} \&fun, const  {\bf QByte\-Array} \&data, {\bf QCString} \&reply\-Type, {\bf QByte\-Array} \&reply\-Data)
\begin{CompactList}\small\item\em Internal reimplementation of {\bf DCOPObject\-Proxy::process} . \item\end{CompactList}\item 
virtual bool {\bf process\-Action} (const  {\bf QCString} \&obj, const  {\bf QCString} \&fun, const  {\bf QByte\-Array} \&data, {\bf QCString} \&reply\-Type, {\bf QByte\-Array} \&reply\-Data, {\bf KAction} $\ast$action)
\begin{CompactList}\small\item\em Called by the {\bf process}{\rm (p.\,\pageref{classKDCOPActionProxy_a7})} method and takes care of processing the object request for an action object. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKDCOPActionProxy_b0}

\end{CompactItemize}


\subsection{Detailed Description}
The KDCOPAction\-Proxy class provides an easy way to publish a collection of {\bf KAction}{\rm (p.\,\pageref{classKAction})} objects through DCOP. A proxy class publishing a DCOP interface for actions. 

For the DCOP client the exported actions behave like full-fledged DCOP objects, providing full access to the {\bf KAction}{\rm (p.\,\pageref{classKAction})} object functionality in the server.

This class can generate DCOP object ids for given action objects, which it automatically processes, as being a {\bf DCOPObject\-Proxy} .



Definition at line 38 of file kdcopactionproxy.h.

\subsection{Constructor \& Destructor Documentation}
\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!KDCOPActionProxy@{KDCOPActionProxy}}
\index{KDCOPActionProxy@{KDCOPActionProxy}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDCOPAction\-Proxy::KDCOPAction\-Proxy ({\bf KAction\-Collection} $\ast$ {\em action\-Collection}, {\bf DCOPObject} $\ast$ {\em parent})}\label{classKDCOPActionProxy_a0}


Constructs a dcop action proxy, being able to export the actions of the provided {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} through DCOP, using the parent DCOPObject's object id to generate unique object ids for the actions. 



Definition at line 46 of file kdcopactionproxy.cpp.\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!KDCOPActionProxy@{KDCOPActionProxy}}
\index{KDCOPActionProxy@{KDCOPActionProxy}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDCOPAction\-Proxy::KDCOPAction\-Proxy ({\bf DCOPObject} $\ast$ {\em parent})}\label{classKDCOPActionProxy_a1}


Use this constructor if do not want to provide the exportable actions through a {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} . 

You have to reimplement the virtual {\bf actions}{\rm (p.\,\pageref{classKDCOPActionProxy_a3})}() and {\bf action}{\rm (p.\,\pageref{classKDCOPActionProxy_a4})}() methods if you use this constructor. 

Definition at line 51 of file kdcopactionproxy.cpp.\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!~KDCOPActionProxy@{$\sim$KDCOPActionProxy}}
\index{~KDCOPActionProxy@{$\sim$KDCOPActionProxy}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDCOPAction\-Proxy::$\sim${\bf KDCOPAction\-Proxy} ()}\label{classKDCOPActionProxy_a2}


Destructor. 



Definition at line 65 of file kdcopactionproxy.cpp.

\subsection{Member Function Documentation}
\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!actions@{actions}}
\index{actions@{actions}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QValue\-List}$<$ {\bf KAction} $\ast$ $>$ KDCOPAction\-Proxy::actions () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKDCOPActionProxy_a3}


Returns a list of exportable actions. 

The default implementation returns a list of actions provided by a {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})}, if the first constructor has been used. 

Definition at line 70 of file kdcopactionproxy.cpp.

Referenced by action\-Map().\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!action@{action}}
\index{action@{action}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAction} $\ast$ KDCOPAction\-Proxy::action (const char $\ast$ {\em name}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKDCOPActionProxy_a4}


Returns an action object with the given name. 

The default implementation queries the action object from the {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})}, if the first constructor has been used. 

Definition at line 78 of file kdcopactionproxy.cpp.

References KStd\-Accel::name().

Referenced by process().\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!actionObjectId@{actionObjectId}}
\index{actionObjectId@{actionObjectId}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KDCOPAction\-Proxy::action\-Object\-Id (const {\bf QCString} \& {\em name}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKDCOPActionProxy_a5}


Use this method to retrieve a DCOP object id for an action with the given name. 

This class automatically takes care of processing DCOP object requests for the returned object id.

You can construct a global DCOP object referenence using {\bf DCOPRef}. For example like {\bf DCOPRef}( kapp-$>$dcop\-Client()-$>$app\-Id, action\-Proxy-$>$action\-Object\-Id( action\-Name ) );

The action with the given name has to be available through the {\bf action}{\rm (p.\,\pageref{classKDCOPActionProxy_a4})} method. 

Definition at line 86 of file kdcopactionproxy.cpp.

References KStd\-Accel::name().

Referenced by action\-Map().\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!actionMap@{actionMap}}
\index{actionMap@{actionMap}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QMap}$<$ {\bf QCString}, {\bf DCOPRef} $>$ KDCOPAction\-Proxy::action\-Map (const {\bf QCString} \& {\em app\-Id} = {\bf QCString}()) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKDCOPActionProxy_a6}


Returns a map of all exported actions, with the action name as keys and a global DCOP reference as data entries. 

The app\-Id argument is used to specify the appid component of the DCOP reference. By default the global application id is used ( kapp-$>$dcop\-Client()-$>$app\-Id() ) . 

Definition at line 91 of file kdcopactionproxy.cpp.

References action\-Object\-Id(), actions(), QValue\-List::begin(), QValue\-List::end(), KStd\-Accel::end(), QMap::insert(), and QCString::is\-Empty().\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!process@{process}}
\index{process@{process}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KDCOPAction\-Proxy::process (const {\bf QCString} \& {\em obj}, const {\bf QCString} \& {\em fun}, const {\bf QByte\-Array} \& {\em data}, {\bf QCString} \& {\em reply\-Type}, {\bf QByte\-Array} \& {\em reply\-Data})\hspace{0.3cm}{\tt  [virtual]}}\label{classKDCOPActionProxy_a7}


Internal reimplementation of {\bf DCOPObject\-Proxy::process} . 



Reimplemented from {\bf DCOPObject\-Proxy}.

Definition at line 108 of file kdcopactionproxy.cpp.

References action(), QCString::left(), QCString::mid(), and process\-Action().\index{KDCOPActionProxy@{KDCOPAction\-Proxy}!processAction@{processAction}}
\index{processAction@{processAction}!KDCOPActionProxy@{KDCOPAction\-Proxy}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KDCOPAction\-Proxy::process\-Action (const {\bf QCString} \& {\em obj}, const {\bf QCString} \& {\em fun}, const {\bf QByte\-Array} \& {\em data}, {\bf QCString} \& {\em reply\-Type}, {\bf QByte\-Array} \& {\em reply\-Data}, {\bf KAction} $\ast$ {\em action})\hspace{0.3cm}{\tt  [virtual]}}\label{classKDCOPActionProxy_a8}


Called by the {\bf process}{\rm (p.\,\pageref{classKDCOPActionProxy_a7})} method and takes care of processing the object request for an action object. 



Definition at line 121 of file kdcopactionproxy.cpp.

References KStd\-Accel::action(), KDCOPProperty\-Proxy::functions(), and KDCOPProperty\-Proxy::process\-Property\-Request().

Referenced by process().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kdcopactionproxy.h\item 
kdcopactionproxy.cpp\end{CompactItemize}
