3a4a7fec0d
- Use host name specified in ObtainAuthToken call instead of the normalized host name to connect to the ATS to avoid problems when the host name obtained through a reverse DNS lookup fails to resolve via a forward DNS lookup. - Added the capability log debug messages to a file. - Added method to the ConfigIf to free memory returned by calls to getEntryValue to avoid issues related to freeing memory allocated with a heap different than the one owned by the library freeing the memory.
148 lines
4.6 KiB
C
148 lines
4.6 KiB
C
/***********************************************************************
|
|
*
|
|
* 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
|
|
(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_
|
|
|