/*****************************************************************************************
* $Header: /home/eliot/asi/repo/cvsrepo/Repository/apps/asx/asxstring.h,v 1.5 2008/03/25 14:32:45 as-tfe Exp $
*
* ASXSTRING.H
* String definitions for cross platform/API audio class library
*
* Copyright (C) AudioScience 2004
*****************************************************************************************/

#ifndef _ASXSTRING_H_
#define _ASXSTRING_H_


// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the ASX32_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// ASX32_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef ASX32_EXPORTS
#define ASX32_API __declspec(dllexport)
#endif
#ifdef ASX32_IMPORTS
#define ASX32_API __declspec(dllimport)
#endif
#ifndef ASX32_API
#define ASX32_API
#endif


#ifdef __cplusplus
extern "C" {
#endif

/**
 * Translate an ASX enum into a string.
 * @param nEnum The enum value to translate.
 * @param szString The returned string is copied here. The caller should allocate enough memory to
 * hold the returned string. Call this function with szString=0 and check the RequiredLength field
 * to determine how much memory to allocate.
 * @param nLength The length of szString.
 * @param pRequiredLength The required minimum length of the caller's char array.
 * @return Returns 0 on success.
 */
ASX32_API int ASXSTRING_EnumToString(const int nEnum, char *szString, const int nLength, int *pRequiredLength);

/**
 * Translate a string into an ASX enum.
 * @param szString The string to look up in enum list.
 * @param pnEnum The enum value returned.
 * @return Returns 0 on success.
 */
ASX32_API int ASXSTRING_StringToEnum(const char *szString, int *pnEnum);

#ifdef __cplusplus
}
#endif

#endif
