GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

GATRequest.h

Go to the documentation of this file.
00001 /** @file GATRequest.h
00002  *  Header file for the GATRequest class.
00003  *
00004  *  A GATRequest represents an information or command request coming from
00005  *  another process.
00006  *
00007  *  @date Fri Jan 30 2004
00008  *
00009  *  @version $Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATRequest.h,v 1.12 2004/04/01 17:21:28 hartmutkaiser Exp $
00010  *
00011  *  Copyright (C) Hartmut Kaiser
00012  *  This file is part of the GAT Engine.
00013  *  Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.
00014  *
00015  *  Use, modification and distribution is subject to the Gridlab Software
00016  *  License. (See accompanying file GLlicense.txt or copy at
00017  *  http://www.gridlab.org/GLlicense.txt)
00018  */
00019 
00020 #if !defined(_GATREQUEST_H_)
00021 #define _GATREQUEST_H_
00022 
00023 /* GAT Header Files */
00024 #include "GATObject.h"
00025 #include "GATRequestNotifier.h"
00026 
00027 /* Structures, unions and enums */
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00032 /* Declare the converters to/from GATObject */
00033 GATOBJECT_DECLARE_CONVERTERS(GATRequest);
00034 
00035 /** GATRequest_Create
00036  *  @brief Create a new GATRequest object
00037  *
00038  *  The function @c GATRequest_internal_Create creates a new 
00039  *  GATRequest object
00040  *
00041  *  @param context The GAT context to use while thie initialisation of the 
00042  *        new object.
00043  *  @param preferences The preferences to use wile selecting the adaptor for 
00044  *        the corresponding CPI.
00045  *
00046  *  @return Returns a handle to the newly created GATRequest object.
00047  *        Returns 0 (zero) if an error occurs.
00048  */
00049 GATRequest 
00050   GATRequest_Create(GATContext context, GATPreferences_const preferences, 
00051     GATRequestListener listener, void *client_contextdata, GATRequestType type, 
00052     GATTable_const parameters, char const *request_name, 
00053     void *initialisation_data);
00054 
00055 /** void GATRequest_Destroy(GATRequest *resource)
00056  *
00057  *  The function GATRequest_Destroy is the destructor used to
00058  *  free all the memory allocated by an GATRequest instance.
00059  *
00060  *  @param object The pointer to the GATRequest to destroy
00061  */
00062 void
00063   GATRequest_Destroy(GATRequest *object);
00064 
00065 /** GATRequest_Equals
00066  *  @brief Compare two GATRequest objects
00067  *
00068  *  The function @c GATRequest_Equals compares two objects of the
00069  *  @c GATRequest type.
00070  *
00071  *  @param lhs The first list to compare
00072  *  @param rhs The second list to compare
00073  *  @param isequal The pointer to the location, where the outcome of the 
00074  *        function has to be stored.
00075  *
00076  *  @return An error code.
00077  */
00078 GATResult 
00079   GATRequest_Equals(GATRequest_const lhs,
00080     GATRequest_const rhs, GATBool *isequal);
00081 
00082 /** GATRequest_Clone
00083  *  @brief Clone the given GATRequest
00084  *
00085  *  The function @c GATRequest_Clone generates a (deep) copy of 
00086  *  the given GATRequest. 
00087  *
00088  *  @param description The object to clone
00089  *  @param new_object The pointer, through which the result is to be 
00090  *        returned.
00091  *
00092  *  @return An error type.
00093  */
00094 GATResult 
00095   GATRequest_Clone(GATRequest_const object, 
00096     GATRequest *new_object);
00097 
00098 /** GATType GATRequest_GetType(GATRequest_const resource)
00099  *  @brief Return the type of the GATRequest
00100  *
00101  *  The function @c GATRequest_GetType always returns 
00102  *  @c #GATType_GATRequest. 
00103  *
00104  *  @param object The object to inspect
00105  *
00106  *  @return Returns always @c #GATType_GATRequest. 
00107  */
00108 GATType
00109   GATRequest_GetType(GATRequest_const object);
00110 
00111 /** GATResult GATRequest_GetInterface(GATRequest_const file, GATInterface iftype, void const **ifp)
00112  *  @brief Get an interface supported by a GATObject
00113  *
00114  *  The function GATRequest_GetInterface allows to get a pointer to an 
00115  *  additional interface supported by this GATRequest.
00116  *
00117  *  @param object The object to be asked for the new interface.
00118  *  @param iftype The interface the object is to be asked for.
00119  *  @param ifp The pointer, through which the result is to be returned.
00120  *
00121  *  @return An error type.
00122  */
00123 GATResult  
00124   GATRequest_GetInterface(GATRequest_const object, 
00125     GATInterface iftype, void const **ifp);
00126 
00127 /** GATRequest_GetRequestNotifier
00128  *  
00129  *  The functions GATRequest_GetRequestNotifier gets the GATRequestNotifier 
00130  *  associated with this GATRequest.
00131  *
00132  *  @param request The GATRequest object to query for its request name.
00133  *  @param The pointer to a variable, which should receive the returned
00134  *        request notifier associated with this GATRequest object.
00135  *
00136  *  @return An error code.
00137  */
00138 GATResult 
00139 GATRequest_GetRequestNotifier(GATRequest_const request,
00140   GATRequestNotifier_const *notifier);
00141   
00142 /** GATRequest_GetRequestName
00143  *  
00144  *  The functions GATRequest_GetRequestName gets the GATRequest name associated 
00145  *  with this GATRequest.
00146  *
00147  *  @param request The GATRequest object to query for its request name.
00148  *
00149  *  @return The request name or 0 (zero) if an error occurs.
00150  */
00151 char const *
00152   GATRequest_GetRequestName(GATRequest_const request);
00153 
00154 /** GATRequest_IssueCommand
00155  *  
00156  *  The function GATRequest_IssueCommand is to be called by an adaptor to issue
00157  *  the command or query for the information, which corresponds to this 
00158  *  GATRequest.
00159  *
00160  *  @param request The request object, for which the command should be issued 
00161  *        or the information is to be queried.
00162  *
00163  *  @return An error code.
00164  */
00165 GATResult
00166 GATRequest_IssueCommand(GATRequest_const request);
00167 
00168 #ifdef __cplusplus
00169 } /* extern "C" */
00170 #endif
00171 
00172 #endif /* !defined(_GATREQUEST_H_) */
00173