GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

logical_filestore.c File Reference

Source file for the logical_filestore class. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GATUtil.h"
#include "GATErrors.h"
#include "GATStatus.h"
#include "GATContext.h"
#include "GATFile.h"
#include "GATLocation.h"
#include "GATList.h"
#include "logical_filestore.h"

Include dependency graph for logical_filestore.c:

Include dependency graph

Go to the source code of this file.

Functions

GATResult logical_filestore_init (GATContext ctx, logical_filestore store, GATLogicalFileMode mode)
GATResult logical_filestore_flush (GATContext ctx, logical_filestore store)
logical_filestore logical_filestore_create (GATContext ctx, char const *name, GATLogicalFileMode mode)
void logical_filestore_destroy (GATContext ctx, logical_filestore *store)
GATResult logical_filestore_addfile (GATContext ctx, logical_filestore store, GATFile_const file)
GATResult logical_filestore_removefile (GATContext ctx, logical_filestore store, GATFile_const file)
GATResult logical_filestore_replicate (GATContext ctx, logical_filestore store, GATLocation_const target)
GATResult logical_filestore_getfiles (GATContext ctx, logical_filestore store, GATList_GATFile *files_)
GATResult logical_filestore_remove (logical_filestore store)

Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/logicalfile/logical_filestore.c,v 1.13 2004/04/02 12:31:57 hartmutkaiser Exp $"


Detailed Description

Source file for the logical_filestore class.

Date:
Thu Oct 16 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/logicalfile/logical_filestore.c,v 1.13 2004/04/02 12:31:57 hartmutkaiser Exp

Copyright (C) Hartmut Kaiser This file is part of the GAT Engine. Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] 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 logical_filestore.c.


Function Documentation

GATResult logical_filestore_init GATContext    ctx,
logical_filestore    store,
GATLogicalFileMode    mode
[static]
 

Definition at line 289 of file logical_filestore.c.

References logical_filestore_s::files, GAT_CREATE_STATUS, GAT_FILEOPEN_ERROR, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATList_String_Insert(), GATLogicalFileMode, GATLogicalFileMode_Create, GATLogicalFileMode_Truncate, and logical_filestore_s::name.

Referenced by logical_filestore_create().

GATResult logical_filestore_flush GATContext    ctx,
logical_filestore    store
[static]
 

Definition at line 334 of file logical_filestore.c.

References logical_filestore_s::files, GAT_CREATE_STATUS, GAT_FAIL, GAT_RETURN_STATUS, GAT_USES_STATUS, GATList_String_Begin(), GATList_String_End(), GATList_String_Get(), GATList_String_Next(), name, and logical_filestore_s::name.

Referenced by logical_filestore_destroy().

logical_filestore logical_filestore_create GATContext    ctx,
char const *    name,
GATLogicalFileMode    mode
 

Definition at line 48 of file logical_filestore.c.

References logical_filestore_s::context, logical_filestore_s::files, GAT_SUCCESS, GATFalse, GATList_String_Create(), GATLogicalFileMode, GATUtil_strdup(), logical_filestore_s::isdirty, logical_filestore_destroy(), logical_filestore_init(), name, logical_filestore_s::name, and logical_filestore_s::shouldberemoved.

Referenced by logicalfile_adaptor_LogicalFileCPI_AddFile(), logicalfile_adaptor_LogicalFileCPI_GetFiles(), logicalfile_adaptor_LogicalFileCPI_Remove(), logicalfile_adaptor_LogicalFileCPI_RemoveFile(), and logicalfile_adaptor_LogicalFileCPI_Replicate().

void logical_filestore_destroy GATContext    ctx,
logical_filestore   store
 

Definition at line 91 of file logical_filestore.c.

References GATList_String_Destroy(), GATTrue, and logical_filestore_flush().

Referenced by logical_filestore_create(), logicalfile_adaptor_LogicalFileCPI_AddFile(), logicalfile_adaptor_LogicalFileCPI_GetFiles(), logicalfile_adaptor_LogicalFileCPI_Remove(), logicalfile_adaptor_LogicalFileCPI_RemoveFile(), and logicalfile_adaptor_LogicalFileCPI_Replicate().

GATResult logical_filestore_addfile GATContext    ctx,
logical_filestore    store,
GATFile_const    file
 

Definition at line 120 of file logical_filestore.c.

References filename, logical_filestore_s::files, GAT_CREATE_STATUS, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATFile_const, GATFile_GetLocation(), GATList_String_Insert(), GATLocation_const, GATLocation_ToString(), GATTrue, and logical_filestore_s::isdirty.

Referenced by logicalfile_adaptor_LogicalFileCPI_AddFile().

GATResult logical_filestore_removefile GATContext    ctx,
logical_filestore    store,
GATFile_const    file
 

Definition at line 147 of file logical_filestore.c.

References filename, logical_filestore_s::files, GAT_CREATE_STATUS, GAT_FAIL, GAT_RETURN_STATUS, GAT_USES_STATUS, GATFile_const, GATFile_GetLocation(), GATList_String_Begin(), GATList_String_End(), GATList_String_Erase(), GATList_String_Get(), GATList_String_Next(), GATLocation_const, GATLocation_ToString(), GATTrue, logical_filestore_s::isdirty, and name.

Referenced by logicalfile_adaptor_LogicalFileCPI_RemoveFile().

GATResult logical_filestore_replicate GATContext    ctx,
logical_filestore    store,
GATLocation_const    target
 

Definition at line 182 of file logical_filestore.c.

References logical_filestore_s::files, GAT_CREATE_STATUS, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATFile_Copy(), GATFile_Create(), GATFile_Destroy(), GATFileMode_Overwrite, GATList_String_Begin(), GATList_String_End(), GATList_String_Get(), GATLocation_const, GATLocation_Create(), GATLocation_Destroy(), and name.

Referenced by logicalfile_adaptor_LogicalFileCPI_Replicate().

GATResult logical_filestore_getfiles GATContext    ctx,
logical_filestore    store,
GATList_GATFile *    files_
 

Definition at line 224 of file logical_filestore.c.

References logical_filestore_s::context, logical_filestore_s::files, GAT_CREATE_STATUS, GAT_CREATE_STATUS_IF, GAT_CURRENT_STATUS, GAT_FAIL, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_SUCCESS, GAT_USES_STATUS, GATFile_Create(), GATFile_Destroy(), GATList_String_Begin(), GATList_String_End(), GATList_String_Get(), GATList_String_Next(), GATLocation_Create(), GATLocation_Destroy(), and name.

Referenced by logicalfile_adaptor_LogicalFileCPI_GetFiles().

GATResult logical_filestore_remove logical_filestore    store
 

Definition at line 277 of file logical_filestore.c.

References GAT_SUCCESS, GATTrue, and logical_filestore_s::shouldberemoved.

Referenced by logicalfile_adaptor_LogicalFileCPI_Remove().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/logicalfile/logical_filestore.c,v 1.13 2004/04/02 12:31:57 hartmutkaiser Exp $" [static]
 

Definition at line 17 of file logical_filestore.c.