GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

GATRequestNotifier.h

Go to the documentation of this file.
00001 /** @file GATRequestNotifier.h
00002  *  Header file for the GATRequestNotifier class.
00003  *
00004  *  TODO: Fill in the description of the new GAT object here
00005  *
00006  *  @date Fri Jan 30 2004
00007  *
00008  *  @version $Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATRequestNotifier.h,v 1.5 2004/03/24 19:30:58 hartmutkaiser Exp $
00009  *
00010  *  Copyright (C) Hartmut Kaiser
00011  *  This file is part of the GAT Engine.
00012  *  Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.
00013  *
00014  *  Use, modification and distribution is subject to the Gridlab Software
00015  *  License. (See accompanying file GLlicense.txt or copy at
00016  *  http://www.gridlab.org/GLlicense.txt)
00017  */
00018 
00019 #if !defined(_GATREQUESTNOTIFIER_H_)
00020 #define  _GATREQUESTNOTIFIER_H_
00021 
00022 /* GAT Header Files */
00023 #include "GATObject.h"
00024 #include "GATType.h"
00025 #include "GATRequestCPI.h"
00026 
00027 /* Structures, unions and enums */
00028 
00029 /* GATRequestNotifierListener */
00030 typedef GATResult (*GATRequestNotifierListener)(void *, 
00031   struct GATRequestCPI_Instance_S const *, GATTable_const, void *);
00032 
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 /* Declare the converters to/from GATObject */
00039 GATOBJECT_DECLARE_CONVERTERS(GATRequestNotifier);
00040 
00041 /** GATRequestNotifier_Create
00042  *  @brief Create a new GATRequestNotifier object
00043  *
00044  *  The function @c GATRequestNotifier_Create creates a new 
00045  *  GATRequestNotifier object
00046  *
00047  *  @param context The GAT context to use while thie initialisation of the 
00048  *        new object.
00049  *  @param preferences The preferences to use wile selecting the adaptor for 
00050  *        the corresponding CPI.
00051  *
00052  *  @return Returns a handle to the newly created GATRequestNotifier object.
00053  *        Returns 0 (zero) if an error occurs.
00054  */
00055 GATRequestNotifier 
00056   GATRequestNotifier_Create(void *adaptor_data,
00057     struct GATRequestCPI_Instance_S const *instance_data, 
00058     GATRequestNotifierListener listener, void *context_data);
00059 
00060 /** void GATRequestNotifier_Destroy(GATRequestNotifier *resource)
00061  *
00062  *  The function GATRequestNotifier_Destroy is the destructor used to
00063  *  free all the memory allocated by an GATRequestNotifier instance.
00064  *
00065  *  @param object The pointer to the GATRequestNotifier to destroy
00066  */
00067 void
00068   GATRequestNotifier_Destroy(GATRequestNotifier *object);
00069 
00070 /** GATRequestNotifier_Equals
00071  *  @brief Compare two GATRequestNotifier objects
00072  *
00073  *  The function @c GATRequestNotifier_Equals compares two objects of the
00074  *  @c GATRequestNotifier type.
00075  *
00076  *  @param lhs The first list to compare
00077  *  @param rhs The second list to compare
00078  *  @param isequal The pointer to the location, where the outcome of the 
00079  *        function has to be stored.
00080  *
00081  *  @return An error code.
00082  */
00083 GATResult 
00084   GATRequestNotifier_Equals(GATRequestNotifier_const lhs,
00085     GATRequestNotifier_const rhs, GATBool *isequal);
00086 
00087 /** GATRequestNotifier_Clone
00088  *  @brief Clone the given GATRequestNotifier
00089  *
00090  *  The function @c GATRequestNotifier_Clone generates a (deep) copy of 
00091  *  the given GATRequestNotifier. 
00092  *
00093  *  @param description The object to clone
00094  *  @param new_object The pointer, through which the result is to be 
00095  *        returned.
00096  *
00097  *  @return An error type.
00098  */
00099 GATResult 
00100   GATRequestNotifier_Clone(GATRequestNotifier_const object, 
00101     GATRequestNotifier *new_object);
00102 
00103 /** GATType GATRequestNotifier_GetType(GATRequestNotifier_const resource)
00104  *  @brief Return the type of the GATRequestNotifier
00105  *
00106  *  The function @c GATRequestNotifier_GetType always returns 
00107  *  @c #GATType_GATRequestNotifier. 
00108  *
00109  *  @param object The object to inspect
00110  *
00111  *  @return Returns always @c #GATType_GATRequestNotifier. 
00112  */
00113 GATType
00114   GATRequestNotifier_GetType(GATRequestNotifier_const object);
00115 
00116 /** GATResult GATRequestNotifier_GetInterface(GATRequestNotifier_const file, GATInterface iftype, void const **ifp)
00117  *  @brief Get an interface supported by a GATObject
00118  *
00119  *  The function GATRequestNotifier_GetInterface allows to get a pointer to an 
00120  *  additional interface supported by this GATRequestNotifier.
00121  *
00122  *  @param object The object to be asked for the new interface.
00123  *  @param iftype The interface the object is to be asked for.
00124  *  @param ifp The pointer, through which the result is to be returned.
00125  *
00126  *  @return An error type.
00127  */
00128 GATResult  
00129   GATRequestNotifier_GetInterface(GATRequestNotifier_const object, 
00130     GATInterface iftype, void const **ifp);
00131 
00132 /** GATRequestNotifier_Respond
00133  *  
00134  *  The function GATRequestNotifier_Respond finalises a GATRequest, passing any 
00135  *  response information back to the invoker.
00136  *
00137  *  @param notifier The request notifier associated with the request object to 
00138  *        finalize.
00139  *  @param table Return Data containing any response data.
00140  *
00141  *  @return An error code.
00142  */
00143 GATResult
00144   GATRequestNotifier_Respond(GATRequestNotifier_const notifier, GATTable table);
00145   
00146 #ifdef __cplusplus
00147 } /* extern "C" */
00148 #endif
00149 
00150 #endif /* !defined(_GATREQUESTNOTIFIER_H_) */
00151