Framework/Article/Asynchronous Callback Service

From Apache OpenOffice Wiki
< Framework
Revision as of 10:25, 2 November 2007 by Cd (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Asynchronous callback service

[cpp]

  1. ifndef __com_sun_star_awt_AsyncCallback_idl__
  2. define __com_sun_star_awt_AsyncCallback_idl__
  1. ifndef __com_sun_star_awt_XRequestCallback_idl__
  2. include <com/sun/star/awt/XRequestCallback.idl>
  3. endif

module com { module sun { module star { module awt {

//============================================================================ /** An implementation which uses the message queue to call the

   callback implementation asynchronously.
   @see XRequestCallback
*/

service AsyncCallback: XRequestCallback;

}; }; }; };

  1. endif


[cpp]

  1. ifndef __com_sun_star_awt_XRequestCallback_idl__
  2. define __com_sun_star_awt_XRequestCallback_idl__
  1. ifndef __com_sun_star_awt_XCallback_idl__
  2. include <com/sun/star/awt/XCallback.idl>
  3. endif

//=============================================================================

module com { module sun { module star { module awt {

//=============================================================================

/** specifices an interface which can be used to call back

   an implementation
*/

interface XRequestCallback { //-------------------------------------------------------------------------

/** adds a callback request to the implementation

       @param aData

any private data which will be provided to the callback implementation.

       @param xCallback

a reference to the callback which should be called by the implementation

       of this interface.
   */
   void addCallback( [in] XCallback xCallback, [in] any aData );

};

//=============================================================================

}; }; }; };

  1. endif

Personal tools