/*	Storage.h - Handles persistent storage
*
*******************************************************************************
* Copyright (c) 1996-97 Digi International Inc., All Rights Reserved          *
*                                                                             *
* This  software  contains  proprietary  and  confidential   information   of *
* Digi International  Inc.   By  accepting  transfer  of this copy, Recipient *
* agrees to retain this software in  confidence,  to  prevent  disclosure  to *
* others,  and  to make no  use of this software other than that for which it *
* was delivered.  This is an unpublished copyright work  Digi   International *
* Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is *
* strictly prohibited.                                                        *
*                                                                             *
* Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc. *
* Confidential  when   combined   with   the   aggregated  modules  for  this *
* product) OBJECT CODE ONLY SOURCE MATERIALS                                  *
*                                                                             *
* (C) COPYRIGHT Digi International Inc. 1996-97                               *
*                                                                             *
* All Rights Reserved                                                         *
*                                                                             *
* US   Government   Users   Restricted   Rights   -   Use,   duplication   or *
* disclosure  restricted by GSA ADP Schedule Contract with Digi International *
* Inc.                                                                        *
*                                                                             *
*******************************************************************************
*
*/

#if !defined(__STORAGE_H__)
#define	__STORAGE_H__

BOOL StorageInitialize(char const * const pszModule);
void StorageTearDown(void);

BOOL GetStoredString(char const * const pszName, char * const ppszString, size_t * const pcbSize, char const * const pszDefault);
BOOL GetStoredNumeric(char const * const pszName, void * const pvNumber, size_t const cbSize, void * const pvDefault);

#define GetStoredNumber(name, pnum, pdef)	GetStoredNumeric((name), (pnum), sizeof *(pnum), (pdef))

BOOL SetStoredString(char const * const pszName, char const * const pszString);
BOOL SetStoredNumeric(char const * const pszName, void * const pvNumber, size_t const cbSize);

#define SetStoredNumber(name, pnum)			SetStoredNumeric((name), (pnum), sizeof *(pnum))

void DeleteStoredValue(char const * const pszName);
BOOL StoredValueExists(char const * const pszName);

#endif