/*********************************************************************** * * 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 * ***********************************************************************/ #ifndef _CONFIG_IF_H_ #define _CONFIG_IF_H_ //===[ Include files ]===================================================== //===[ Type definitions ]================================================== //===[ Function prototypes ]=============================================== //===[ Global variables ]================================================== /************************************************************************** *************************************************************************** ** ** ** Configuration Object Interface Definitions ** ** ** *************************************************************************** **************************************************************************/ //++======================================================================= typedef int (SSCS_CALL *PFNConfigIf_AddReference)( IN const void *pIfInstance); // // Arguments: // pIfInstance - // Pointer to interface object. // // Returns: // Interface reference count. // // Description: // Increases interface reference count. //=======================================================================-- //++======================================================================= typedef void (SSCS_CALL *PFNConfigIf_ReleaseReference)( 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* (SSCS_CALL *PFNConfigIf_GetEntryValue)( 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. // This NULL terminated string must be free by executing the interface // object freeValueString method. // // Description: // Gets value associated with a key for the configuration object. //=======================================================================-- //++======================================================================= 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. //=======================================================================-- // // Config Interface Object // typedef struct _ConfigIf { PFNConfigIf_AddReference addReference; PFNConfigIf_ReleaseReference releaseReference; PFNConfigIf_GetEntryValue getEntryValue; PFNConfigIf_FreeValueString freeValueString; } ConfigIf, *PConfigIf; #endif // #ifndef _CONFIG_IF_H_