GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

GATRegistry.c File Reference

Main file for the GATRegsitry class. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "GATRegistry.h"
#include "GATErrors.h"
#include "GATPreferences.h"
#include "GATList.h"
#include "GATSelf.h"

Include dependency graph for GATRegistry.c:

Include dependency graph

Go to the source code of this file.

Compounds

struct  CPIRegistryList_S
struct  CPIList_S
struct  GATRegistry_S
struct  GATCPI_S

Defines

#define CPILIST_NAME(object)   object ## _list
#define CPI_FUNCTIONS(object)

Typedefs

typedef CPIList_SCPIList
typedef CPIList_S const * CPIList_const
typedef void(* GATCPI_Adaptor_Destroy )(void *)
typedef GATResult(* GATCPI_Adaptor_ServiceActions )(void *, void *, GATTimePeriod_const)

Functions

 GATOBJECT_DEFINE_VTABLE (GATRegistry)
 GATLIST_DEFINE_QUALIFIED (static, GATObject, GATList_GATObject, GATType_PlainOldData)
int GATRegistry_internal_AddCPI (CPIRegistryList *list, void *cpi, void *token, GATPreferences_const preferences)
CPIList GATRegistry_internal_FindCPI (CPIRegistryList_const list, GATPreferences_const preferences)
CPIList GATRegistry_internal_FindCPIWorker (CPIRegistryList_const list, GATPreferences_const preferences)
void GATRegistry_internal_DestroyCPIList (CPIList list)
CPIList GATRegistry_internal_CloneCPIList (CPIList_const list)
GATResult GATRegistry_internal_WalkCPIList (CPIRegistryList_const list, GATCPICallback callback, void *data)
GATResult GATRegistry_ServiceActionsCallback (CPIRegistryList_const cpi, void *data)
GATResult GATRegistry_CorrectTimeout (GATTime start, GATTimePeriod *timeout)
GATResult GATRegistry_internal_AddGATObjectToCPIList (CPIRegistryList_const list, void *cpi, GATObject object)
GATResult GATRegistry_internal_RemoveGATObjectFromCPIList (CPIRegistryList_const list, void *cpi, GATObject object)
void GATRegistry_DestroyPipeCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyEndpointCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyFileCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyFileStreamCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyLogicalFileCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyResourceBrokerCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyReservationCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyResourceCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyJobCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroySelfCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyRequestCPIRegistryList (CPIRegistryList list)
void GATRegistry_DestroyAdvertServiceCPIRegistryList (CPIRegistryList list)
GATType GATRegistry_GetType (GATRegistry_const file)
 GATType GATRegistry_GetType(GATRegistry_const file) Return the type of the GATRegistry.

GATResult GATRegistry_Equals (GATRegistry_const lhs, GATRegistry_const rhs, GATBool *isequal)
 GATRegistry_Equals Compare two GATRegistry objects.

GATResult GATRegistry_Clone (GATRegistry_const object, GATRegistry *new_object)
 GATRegistry_Clone Clone the given GATRegistry.

GATResult GATRegistry_GetInterface (GATRegistry_const object, GATInterface iftype, void const **ifp)
 GATResult GATRegistry_GetInterface(GATRegistry_const file, GATInterface iftype, void const **ifp) Get an interface supported by a GATObject.

GATRegistry GATRegistry_Create (void)
 GATRegistry_Create The GATRegistry constructor.

void GATRegistry_Destroy (GATRegistry *registry)
 GATRegistry_Destroy The GATRegistry destructor.

 CPI_FUNCTIONS (Pipe) CPI_FUNCTIONS(Endpoint) CPI_FUNCTIONS(File) CPI_FUNCTIONS(FileStream) CPI_FUNCTIONS(LogicalFile) CPI_FUNCTIONS(ResourceBroker) CPI_FUNCTIONS(Reservation) CPI_FUNCTIONS(Resource) CPI_FUNCTIONS(Job) CPI_FUNCTIONS(Self) CPI_FUNCTIONS(Request) CPI_FUNCTIONS(AdvertService) static GATResult GATRegistry_internal_AddCPI(CPIRegistryList *list
 GATRegistry_internal_AddCPI Add a CPI to a given list of CPIs This adds the specified CPI object to the passed list.


Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATRegistry.c,v 1.34 2004/04/18 18:35:10 hartmutkaiser Exp $"
GATRegistry_vtable GATRegistry__vtable
void * cpi
void void * token


Detailed Description

Main file for the GATRegsitry class.

The Registry keeps track of all capabilities and their providers.

Date:
Thu Sep 18 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATRegistry.c,v 1.34 2004/04/18 18:35:10 hartmutkaiser Exp

Copyright (C) Tom Goodale This file is part of the GAT Engine. Contributed by Tom Goodale <goodale@aei.mpg.de>.

Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)

Definition in file GATRegistry.c.


Define Documentation

#define CPILIST_NAME object       object ## _list
 

Definition at line 41 of file GATRegistry.c.

#define CPI_FUNCTIONS object   
 

Definition at line 43 of file GATRegistry.c.


Typedef Documentation

typedef struct CPIList_S* CPIList
 

Definition at line 113 of file GATRegistry.c.

typedef struct CPIList_S const* CPIList_const
 

Definition at line 114 of file GATRegistry.c.

typedef void(* GATCPI_Adaptor_Destroy)(void *)
 

Definition at line 135 of file GATRegistry.c.

typedef GATResult(* GATCPI_Adaptor_ServiceActions)(void *, void *, GATTimePeriod_const)
 

Definition at line 136 of file GATRegistry.c.


Function Documentation

GATOBJECT_DEFINE_VTABLE GATRegistry   
 

GATLIST_DEFINE_QUALIFIED static   ,
GATObject   ,
GATList_GATObject   ,
GATType_PlainOldData   
 

int GATRegistry_internal_AddCPI CPIRegistryList   list,
void *    cpi,
void *    token,
GATPreferences_const    preferences
[static]
 

CPIList GATRegistry_internal_FindCPI CPIRegistryList_const    list,
GATPreferences_const    preferences
[static]
 

CPIList GATRegistry_internal_FindCPIWorker CPIRegistryList_const    list,
GATPreferences_const    preferences
[static]
 

void GATRegistry_internal_DestroyCPIList CPIList    list [static]
 

CPIList GATRegistry_internal_CloneCPIList CPIList_const    list [static]
 

GATResult GATRegistry_internal_WalkCPIList CPIRegistryList_const    list,
GATCPICallback    callback,
void *    data
[static]
 

GATResult GATRegistry_ServiceActionsCallback CPIRegistryList_const    cpi,
void *    data
[static]
 

GATResult GATRegistry_CorrectTimeout GATTime    start,
GATTimePeriod   timeout
[static]
 

GATResult GATRegistry_internal_AddGATObjectToCPIList CPIRegistryList_const    list,
void *    cpi,
GATObject    object
[static]
 

GATResult GATRegistry_internal_RemoveGATObjectFromCPIList CPIRegistryList_const    list,
void *    cpi,
GATObject    object
[static]
 

void GATRegistry_DestroyPipeCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyEndpointCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyFileCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyFileStreamCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyLogicalFileCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyResourceBrokerCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyReservationCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyResourceCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyJobCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroySelfCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyRequestCPIRegistryList CPIRegistryList    list [static]
 

Referenced by GATRegistry_Destroy().

void GATRegistry_DestroyAdvertServiceCPIRegistryList CPIRegistryList    list [static]
 

GATType GATRegistry_GetType GATRegistry_const    file [static]
 

GATType GATRegistry_GetType(GATRegistry_const file) Return the type of the GATRegistry.

The function GATRegistry_GetType always returns GATType_GATRegistry.

Parameters:
object  The object to inspect
Returns:
returns always #GATType_GATRegistry.

Definition at line 306 of file GATRegistry.c.

References GAT_UNUSED_PARAMETER, GATRegistry_const, and GATType_GATRegistry.

GATResult GATRegistry_Equals GATRegistry_const    lhs,
GATRegistry_const    rhs,
GATBool   isequal
[static]
 

GATRegistry_Equals Compare two GATRegistry objects.

The function GATRegistry_Equals compares two objects of the GATRegistry type.

Parameters:
lhs  The first list to compare
rhs  The second list to compare
isequal  The pointer to the GATBool variable, which should receive the result if the comparision
Returns:
An error code.

Definition at line 326 of file GATRegistry.c.

References GAT_NOTIMPL, GATBool, and GATRegistry_const.

GATResult GATRegistry_Clone GATRegistry_const    handle,
GATRegistry   new_handle
[static]
 

GATRegistry_Clone Clone the given GATRegistry.

The function GATRegistry_Clone generates a (deep) copy of the given GATRegistry.

Parameters:
description  The object to clone
new_object  The pointer, through which the result is to be returned.
Returns:
An error type.

Definition at line 345 of file GATRegistry.c.

References GAT_NOTIMPL, GATRegistry_const, and handle.

GATResult GATRegistry_GetInterface GATRegistry_const    object,
GATInterface    iftype,
void const **    ifp
[static]
 

GATResult GATRegistry_GetInterface(GATRegistry_const file, GATInterface iftype, void const **ifp) Get an interface supported by a GATObject.

The function GATRegistry_GetInterface allows to get a pointer to an additional interface supported by this GATRegistry.

Parameters:
object  The object to be asked for the new interface.
iftype  The interface the object is to be asked for.
ifp  The pointer, through which the result is to be returned.
Returns:
An error type.

Definition at line 363 of file GATRegistry.c.

References GAT_INVALID_PARAMETER, GAT_NO_INTERFACE, GATInterface, GATRegistry_const, and GATResult.

GATRegistry GATRegistry_Create void   
 

GATRegistry_Create The GATRegistry constructor.

This is the constructor for GATRegistry objects.

Returns:
A new GATRegistry

Definition at line 239 of file GATRegistry.c.

References GATRegistry_S::CPILIST_NAME(), GATRegistry_S::GATObject__vtable, and GATRegistry__vtable.

Referenced by GATSelf_Create().

void GATRegistry_Destroy GATRegistry   registry
 

GATRegistry_Destroy The GATRegistry destructor.

This is the destructor for GATRegistry objects.

Parameters:
this  An old GATRegistry

Definition at line 268 of file GATRegistry.c.

References GATRegistry_DestroyEndpointCPIRegistryList(), GATRegistry_DestroyFileCPIRegistryList(), GATRegistry_DestroyFileStreamCPIRegistryList(), GATRegistry_DestroyJobCPIRegistryList(), GATRegistry_DestroyLogicalFileCPIRegistryList(), GATRegistry_DestroyPipeCPIRegistryList(), GATRegistry_DestroyRequestCPIRegistryList(), GATRegistry_DestroyReservationCPIRegistryList(), GATRegistry_DestroyResourceBrokerCPIRegistryList(), GATRegistry_DestroyResourceCPIRegistryList(), and GATRegistry_DestroySelfCPIRegistryList().

Referenced by GATSelf_Destroy().

CPI_FUNCTIONS Pipe   
 

GATRegistry_internal_AddCPI Add a CPI to a given list of CPIs This adds the specified CPI object to the passed list.

Used internally by the type-safe visible functions.

Parameters:
list  the list to be added to
cpi  The CPI object
token  An arbitrary token used by the loader
preferences  The preferences which a user may match against to use this CPI.
Returns:
An error code.


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATRegistry.c,v 1.34 2004/04/18 18:35:10 hartmutkaiser Exp $" [static]
 

Definition at line 19 of file GATRegistry.c.

GATRegistry_vtable GATRegistry__vtable [static]
 

Initial value:

 {
  GATRegistry_GetType,
  GATRegistry_Destroy,
  GATRegistry_Equals,
  GATRegistry_Clone,
  GATRegistry_GetInterface,
  0   
}

Definition at line 222 of file GATRegistry.c.

Referenced by GATRegistry_Create().

void* cpi
 

Definition at line 404 of file GATRegistry.c.

Referenced by advertservice_adaptor_Register_GATAdvertServiceCPI(), endpoint_adaptor_register_endpoint(), fileops_adaptor_FileCPI_DeSerialise(), fileops_adaptor_FileCPI_Serialise(), fileops_adaptor_register(), filestream_adaptor_register(), GATAdvertServiceCPI_Add(), GATAdvertServiceCPI_CloneInstance(), GATAdvertServiceCPI_CreateInstance(), GATAdvertServiceCPI_Delete(), GATAdvertServiceCPI_DestroyInstance(), GATAdvertServiceCPI_EqualsInstance(), GATAdvertServiceCPI_Find(), GATAdvertServiceCPI_GetAdvertisable(), GATAdvertServiceCPI_GetMetaData(), GATAdvertServiceCPI_GetMetricEvent(), GATAdvertServiceCPI_GetMetrics(), GATEndpointCPI_AddGATPipeListener(), GATEndpointCPI_CloneInstance(), GATEndpointCPI_Connect(), GATEndpointCPI_CreateInstance(), GATEndpointCPI_DeSerialise(), GATEndpointCPI_Destroy(), GATEndpointCPI_DestroyInstance(), GATEndpointCPI_EqualsInstance(), GATEndpointCPI_GetMetricEvent(), GATEndpointCPI_GetMetrics(), GATEndpointCPI_Listen(), GATEndpointCPI_Serialise(), GATFileCPI_CloneInstance(), GATFileCPI_Copy(), GATFileCPI_CreateInstance(), GATFileCPI_DeSerialise(), GATFileCPI_Destroy(), GATFileCPI_DestroyInstance(), GATFileCPI_EqualsInstance(), GATFileCPI_GetLength(), GATFileCPI_GetMetricEvent(), GATFileCPI_GetMetrics(), GATFileCPI_IsReadable(), GATFileCPI_IsWritable(), GATFileCPI_LastWriteTime(), GATFileCPI_Move(), GATFileCPI_Serialise(), GATFileStreamCPI_CloneInstance(), GATFileStreamCPI_Close(), GATFileStreamCPI_CreateInstance(), GATFileStreamCPI_Destroy(), GATFileStreamCPI_DestroyInstance(), GATFileStreamCPI_EqualsInstance(), GATFileStreamCPI_GetMetricEvent(), GATFileStreamCPI_GetMetrics(), GATFileStreamCPI_Read(), GATFileStreamCPI_Seek(), GATFileStreamCPI_Write(), GATJobCPI_Checkpoint(), GATJobCPI_CloneInstance(), GATJobCPI_CloneJob(), GATJobCPI_CreateInstance(), GATJobCPI_DeSerialise(), GATJobCPI_DestroyInstance(), GATJobCPI_EqualsInstance(), GATJobCPI_GetInfo(), GATJobCPI_GetJobDescription(), GATJobCPI_GetJobID(), GATJobCPI_GetMetricEvent(), GATJobCPI_GetMetrics(), GATJobCPI_GetStatus(), GATJobCPI_Migrate(), GATJobCPI_Serialise(), GATJobCPI_Stop(), GATJobCPI_UnSchedule(), GATLogicalFileCPI_CloneInstance(), GATLogicalFileCPI_Create(), GATLogicalFileCPI_CreateInstance(), GATLogicalFileCPI_DeSerialise(), GATLogicalFileCPI_Destroy(), GATLogicalFileCPI_DestroyInstance(), GATLogicalFileCPI_EqualsInstance(), GATLogicalFileCPI_GetMetricEvent(), GATLogicalFileCPI_GetMetrics(), GATLogicalFileCPI_Serialise(), GATOBJECT_DEFINE_CONVERTERS(), GATPipeCPI_CloneInstance(), GATPipeCPI_Close(), GATPipeCPI_CreateInstance(), GATPipeCPI_Destroy(), GATPipeCPI_DestroyInstance(), GATPipeCPI_EqualsInstance(), GATPipeCPI_GetMetricEvent(), GATPipeCPI_GetMetrics(), GATPipeCPI_Read(), GATPipeCPI_Seek(), GATPipeCPI_Write(), GATRequestCPI_CloneInstance(), GATRequestCPI_CreateInstance(), GATRequestCPI_DestroyInstance(), GATRequestCPI_EqualsInstance(), GATRequestCPI_InitRequestNotifier(), GATReservationCPI_CloneInstance(), GATReservationCPI_CreateInstance(), GATReservationCPI_DestroyInstance(), GATReservationCPI_EqualsInstance(), GATResourceBrokerCPI_CloneInstance(), GATResourceBrokerCPI_CreateInstance(), GATResourceBrokerCPI_DestroyInstance(), GATResourceBrokerCPI_EqualsInstance(), GATResourceBrokerCPI_FindResources(), GATResourceBrokerCPI_ReserveResource(), GATResourceBrokerCPI_ReserveResource_Description(), GATResourceBrokerCPI_SubmitJob(), GATResourceCPI_CloneInstance(), GATResourceCPI_CreateInstance(), GATResourceCPI_DeSerialise(), GATResourceCPI_DestroyInstance(), GATResourceCPI_EqualsInstance(), GATResourceCPI_GetMetricEvent(), GATResourceCPI_GetMetrics(), GATResourceCPI_GetReservation(), GATResourceCPI_GetResourceDescription(), GATResourceCPI_Serialise(), GATSelfCPI_CreateInstance(), GATSelfCPI_CreateRequestForListener(), GATSelfCPI_DestroyInstance(), GATSelfCPI_DestroyRequestForListener(), GATSelfCPI_GetJob(), logicalfile_adaptor_register(), pipe_adaptor_register_pipe(), resourcebroker_adaptor_GATSelfCPI_CreateRequestForListener(), resourcebroker_adaptor_GATSelfCPI_DestroyRequestForListener(), resourcebroker_adaptor_Register_GATJobCPI(), resourcebroker_adaptor_Register_GATRequestCPI(), resourcebroker_adaptor_Register_GATReservationCPI(), resourcebroker_adaptor_Register_GATResourceBrokerCPI(), resourcebroker_adaptor_Register_GATResourceCPI(), and resourcebroker_adaptor_Register_GATSelfCPI().

void void* token
 

Definition at line 404 of file GATRegistry.c.

Referenced by advertservice_adaptor_register(), advertservice_adaptor_Register_GATAdvertServiceCPI(), endpoint_adaptor_register(), endpoint_adaptor_register_endpoint(), fileops_adaptor_register(), filestream_adaptor_register(), logicalfile_adaptor_register(), pipe_adaptor_register_pipe(), resourcebroker_adaptor_register(), resourcebroker_adaptor_Register_GATJobCPI(), resourcebroker_adaptor_Register_GATRequestCPI(), resourcebroker_adaptor_Register_GATReservationCPI(), resourcebroker_adaptor_Register_GATResourceBrokerCPI(), resourcebroker_adaptor_Register_GATResourceCPI(), and resourcebroker_adaptor_Register_GATSelfCPI().