2006-11-13 06:20:43 +01:00
|
|
|
/***********************************************************************
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; version 2.1
|
|
|
|
* of the License.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, Novell, Inc.
|
|
|
|
*
|
|
|
|
* To contact Novell about this file by physical or electronic mail,
|
|
|
|
* you may find current contact information at www.novell.com.
|
|
|
|
*
|
|
|
|
* Author: Juan Carlos Luciani <jluciani@novell.com>
|
|
|
|
*
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _CONFIG_IF_H_
|
|
|
|
#define _CONFIG_IF_H_
|
|
|
|
|
|
|
|
|
|
|
|
//===[ Include files ]=====================================================
|
|
|
|
|
|
|
|
//===[ Type definitions ]==================================================
|
|
|
|
|
|
|
|
//===[ Function prototypes ]===============================================
|
|
|
|
|
|
|
|
//===[ Global variables ]==================================================
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
***************************************************************************
|
|
|
|
** **
|
|
|
|
** Configuration Object Interface Definitions **
|
|
|
|
** **
|
|
|
|
***************************************************************************
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
//++=======================================================================
|
|
|
|
typedef
|
|
|
|
int
|
2007-03-05 07:48:26 +01:00
|
|
|
(SSCS_CALL *PFNConfigIf_AddReference)(
|
2006-11-13 06:20:43 +01:00
|
|
|
IN const void *pIfInstance);
|
|
|
|
//
|
|
|
|
// Arguments:
|
|
|
|
// pIfInstance -
|
|
|
|
// Pointer to interface object.
|
|
|
|
//
|
|
|
|
// Returns:
|
|
|
|
// Interface reference count.
|
|
|
|
//
|
|
|
|
// Description:
|
|
|
|
// Increases interface reference count.
|
|
|
|
//=======================================================================--
|
|
|
|
|
|
|
|
|
|
|
|
//++=======================================================================
|
|
|
|
typedef
|
|
|
|
void
|
2007-03-05 07:48:26 +01:00
|
|
|
(SSCS_CALL *PFNConfigIf_ReleaseReference)(
|
2006-11-13 06:20:43 +01:00
|
|
|
IN const void *pIfInstance);
|
|
|
|
//
|
|
|
|
// Arguments:
|
|
|
|
// pIfInstance -
|
|
|
|
// Pointer to interface object.
|
|
|
|
//
|
|
|
|
// Returns:
|
|
|
|
// Nothing.
|
|
|
|
//
|
|
|
|
// Description:
|
|
|
|
// Decreases interface reference count. The interface is deallocated if
|
|
|
|
// the reference count becomes zero.
|
|
|
|
//=======================================================================--
|
|
|
|
|
|
|
|
|
|
|
|
//++=======================================================================
|
|
|
|
typedef
|
|
|
|
char*
|
2007-03-05 07:48:26 +01:00
|
|
|
(SSCS_CALL *PFNConfigIf_GetEntryValue)(
|
2006-11-13 06:20:43 +01:00
|
|
|
IN const void *pIfInstance,
|
|
|
|
IN const char *pKeyName);
|
|
|
|
//
|
|
|
|
// Arguments:
|
|
|
|
// pIfInstance -
|
|
|
|
// Pointer to interface object.
|
|
|
|
//
|
|
|
|
// pKeyName -
|
|
|
|
// Pointer to NULL terminated string that contains the
|
|
|
|
// name of the key whose value is being requested.
|
|
|
|
//
|
|
|
|
// Returns:
|
|
|
|
// Pointer to NULL terminated string with value being requested or NULL.
|
2007-03-05 07:48:26 +01:00
|
|
|
// This NULL terminated string must be free by executing the interface
|
|
|
|
// object freeValueString method.
|
2006-11-13 06:20:43 +01:00
|
|
|
//
|
|
|
|
// Description:
|
|
|
|
// Gets value associated with a key for the configuration object.
|
|
|
|
//=======================================================================--
|
|
|
|
|
|
|
|
|
2007-03-05 07:48:26 +01:00
|
|
|
//++=======================================================================
|
|
|
|
typedef
|
|
|
|
void
|
|
|
|
(SSCS_CALL *PFNConfigIf_FreeValueString)(
|
|
|
|
IN const void *pIfInstance,
|
|
|
|
IN char *pValueString);
|
|
|
|
//
|
|
|
|
// Arguments:
|
|
|
|
// pIfInstance -
|
|
|
|
// Pointer to interface object.
|
|
|
|
//
|
|
|
|
// pValueString -
|
|
|
|
// Pointer to NULL terminated string that contains a value
|
|
|
|
// returned from a call to the interface getEntryValue method.
|
|
|
|
//
|
|
|
|
// Returns:
|
|
|
|
// Nothing.
|
|
|
|
//
|
|
|
|
// Description:
|
|
|
|
// Frees value string returned by calling interface's getEntryValue
|
|
|
|
// method.
|
|
|
|
//=======================================================================--
|
|
|
|
|
|
|
|
|
2006-11-13 06:20:43 +01:00
|
|
|
//
|
|
|
|
// Config Interface Object
|
|
|
|
//
|
|
|
|
typedef struct _ConfigIf
|
|
|
|
{
|
2007-03-05 07:48:26 +01:00
|
|
|
PFNConfigIf_AddReference addReference;
|
|
|
|
PFNConfigIf_ReleaseReference releaseReference;
|
|
|
|
PFNConfigIf_GetEntryValue getEntryValue;
|
|
|
|
PFNConfigIf_FreeValueString freeValueString;
|
2006-11-13 06:20:43 +01:00
|
|
|
|
|
|
|
} ConfigIf, *PConfigIf;
|
|
|
|
|
|
|
|
|
|
|
|
#endif // #ifndef _CONFIG_IF_H_
|
|
|
|
|