/**********************************************************************
 * Copyright (c) 2005, 2007 Scapa Technologies Limited and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * $Id: resinterface.h,v 1.2 2007/04/06 01:04:04 jkubasta Exp $
 * 
 * Contributors: 
 * Scapa Technologies Limited - Initial API and implementation
 **********************************************************************/

//////////////////////////////////////////////////////////////
//	The function definitions for the resourceDLL
//////////////////////////////////////////////////////////////
//
//	The four function defintions to be implemented by the custom
//	resource DLL.
//
//////////////////////////////////////////////////////////////
#ifndef __RES_INTERFACE__H__
#define __RES_INTERFACE__H__

#include "hashtable.h"
#include "system.h"

//
//	The startup method - called once to initialize the resource data
//	returning errorcode
//
typedef int		(*LPSTARTUP)	(HashTable*, HashTable*, HashTable*);

//
//	The shutdown method - called once when the agent is stopped
//	and also returns errorcode
//
typedef int		(*LPSHUTDOWN)	();

//
//	Get the tree data : returns a char** of the tree strings with each stirngs of the form 
//		parent ID \0 ID \0 name \0 help \0 suffix \0
//	where int* returns the number of strings in the array. 
//
//	The first hashTable is the request hash
//	The second hashTable is the variable hash
typedef char**	(*LPGETTREE)	(int*);

//
//	Get resource results : char** returns strings of the form
//		ID \0 value \0
//	where int* is the number of returned results
//
//	The first hashTable is the filter hash
//	The second hashTable is the variable hash	
typedef char**	(*LPGETRESULTS)	(int*);

typedef void	(*LPDUMPMEMORY)	();

typedef char* (*LPGETAGENTNAME) ();

#endif

