GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

advertservice_database.h

Go to the documentation of this file.
00001 /** @file advertservice_database.h
00002  *  Header file for the database routines used to simulate a real advert 
00003  *  service.
00004  *
00005  *  @date Fri Mar 19 2004
00006  *
00007  *  @version $Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/advertservice_adaptor/advertservice_database.h,v 1.6 2004/04/05 09:13:59 merzky Exp $
00008  *
00009  *  Copyright (C) Hartmut Kaiser
00010  *  This file is part of the GAT Engine.
00011  *  Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.
00012  *
00013  *  Use, modification and distribution is subject to the Gridlab Software
00014  *  License. (See accompanying file GLlicense.txt or copy at
00015  *  http://www.gridlab.org/GLlicense.txt)
00016  */
00017 
00018 #if !defined(_ADVERTSERVICE_DATABASE_H_)
00019 #define _ADVERTSERVICE_DATABASE_H_
00020 
00021 #include "sqlite.h"
00022 
00023 /* initialise and close the database */
00024 GATResult advertservice_db_init(GATContext context, sqlite **db);
00025 void advertservice_db_close(sqlite **db);
00026 
00027 /** advertservice_db_write_advert_data
00028  *  
00029  */
00030 GATResult 
00031   advertservice_db_write_advert_data(GATContext ctx, sqlite *db, 
00032     char const *path, char const *data, GATTable_const metadata);
00033 
00034 /** advertservice_db_delete_advert_data
00035  *  
00036  */
00037 GATResult
00038   advertservice_db_delete_advert_data(GATContext ctx, sqlite *db, 
00039     char const *path);
00040 
00041 /** advertservice_db_get_metadata
00042  *  
00043  */
00044 GATResult
00045   advertservice_db_get_metadata(GATContext ctx, sqlite *db, 
00046     char const *path, GATTable *metadata);
00047 
00048 /** advertservice_db_get_advertisable_data
00049  *  
00050  */
00051 GATResult
00052   advertservice_db_get_advert_data(GATContext context, sqlite *db, 
00053     char const *pathstr, char **data);
00054 
00055 /** advertservice_db_find
00056  *  
00057  */
00058 GATResult
00059   advertservice_db_find(GATContext context, sqlite *db, 
00060     GATTable_const metadata, GATList_String *paths);
00061 
00062 #endif // !defined(_ADVERTSERVICE_DATABASE_H_)