
/***************************************************************************
**
**    $Header$
**
**    $Log$
** 
****************************************************************************/

/****************************************************************************
**
**  Name:  symblext.h
**
**  Description:
**     Contains declarations of external interfaces to handle bulk-data
**     access from the Symbol server.
**
**  $Log$
** 
**  $Header:   D:/EPSLDV1/SRC/LOG/SYMBLEXT.H__   1.7.1.0.1.0   11 Nov 1996 12:58:44   ZJRD  $
**
**  Copyright (C) 1995 Microtek International.  All rights reserved.
**
*****************************************************************************/
#ifndef _SYMBLEXT_

                       /****************************
                        *                          *
                        *       INCLUDE FILES      *
                        *                          *
                        ****************************/
#include "symblsvr.h"
                       /****************************
                        *                          *
                        *        DEFINITIONS       *
                        *                          *
                        ****************************/
#ifdef __cplusplus
extern "C" {
#endif
                       /****************************
                        *                          *
                        *        PROTOTYPES        *
                        *                          *
                        ****************************/

/*****************************************************************************
** SymGetSymStats
**
** Purpose:
**    Retrieve the number of modules, functions, labels loaded.
**
** Input parameter:
**    none
** Output parameters:
**    numModules:      pointer to number of modules loaded
**    numFunctions:    pointer to number of functions loaded
**    numPublicLabels: pointer to number of public labels loaded
**    numUserLabels:   pointer to number of user-defined labels.
**
** Error:
**    Reports error if no symbol loaded
**
*****************************************************************************/
RETCODE WINAPI 
SymGetSymStats(U16 FAR* numModules, U32 FAR* numFunctions, U32 FAR*
               numPublicLabels, U32 FAR* numUserLabels); 


/***************************************************************************
** SymGetSiblingSymbols
**
** Purpose:
**    Get the specified number of sibling symbol descriptors from the input
**    descriptor <symDesc>. Fill the descriptors into the supplied
**    symDescArray[numRequested].  Return the actual number of symbol
**    descriptors filled in.
**    If the input <symDesc> is a NULL_DESCRIPTOR and the <basicSymType>
**    is SYM_MODULE, then retrieve all module descriptors started from the
**    modules list head.
**    If the input <symDesc> is a NULL_DESCRIPTOR and the <basicSymType>
**    is SYM_PUBLIC_LABEL, then retrieve all public label descriptors started
**    from the public_label list head.
**
** Input parameter:
**    symDesc:      symbol descriptor for starting point
**    basicSymType: type of symbol (modules, label, functions, etc.)
**    numRequested: number of requested sibling symbols.           
**
** Output parameter:
**    symDescArray: a caller supplied symbol descriptor array -
**                  symDescArray[numRequested].
**    numReturned:  actual number of symbol returned.              
**
** Error:
**    Returns error if no symbol loaded.
**    Returns error if <basicSymType> is not a valid type for the type of
**    <symDesc>.
**
*****************************************************************************/
RETCODE WINAPI
SymGetSiblingSymbols(SYM_DESCRIPTOR      symDesc,
                     SYM_TYPE_TYPE       basicSymType,
                     U16                 numRequested,
                     SYM_DESCRIPTOR FAR* symDescArray,
                     U16 FAR*            numReturned);


/***************************************************************************
** SymGetChildSymbolsOfModule
**
** Purpose:
**    Get the specified number of child symbol descriptors of <basicSymType>
**    that are child symbols of the input <moduleDesc>. Fill the child
**    descriptors into the supplied symDescArray. Return the actual number
**    of symbol descriptors filled in.
**
** Input parameter:
**    moduleDesc:   module symbol descriptor
**    basicSymType: type of symbol (functions, block, etc.)
**    numRequested: number of requested child symbols.           
**
** Output parameter:
**    symDescArray: a caller supplied symbol descriptor array -
**                  symDescArray[numRequested].
**    numReturned:  actual number of symbol returned.              
**
** Error:
**    Returns error if no symbol loaded.
**    Returns error if <basicSymType> is not a valid type for child symbol.
**
*****************************************************************************/
RETCODE WINAPI
SymGetChildSymbolsOfModule(SYM_DESCRIPTOR      moduleDesc,
                           SYM_TYPE_TYPE       basicSymType,
                           U16                 numRequested,
                           SYM_DESCRIPTOR FAR* symDescArray,
                           U16 FAR*            numReturned);

/*****************************************************************************
** SymGetLineNumbersOfModule
**
** Purpose:
**    Get the specified number of line number descriptors of the input
**    <moduleDesc>. Fill the line number descriptors into the supplied
**    lineDescArray. Return the actual number of descriptors filling in.
**
** Input parameter:
**    moduleDesc:   module symbol descriptor
**    numRequested: number of requested line numbers.           
**
** Output parameter:
**    lineDescArray: a caller supplied line number descriptor array -
**                   lineDescArray[numRequested].
**    numReturned:  actual number of line returned.              
**
** Error:
**    Returns error if no line numbers.
**
*****************************************************************************/
RETCODE WINAPI
SymGetLineNumbersOfModule(SYM_DESCRIPTOR          moduleDesc,
                          U16                     numRequested,
                          LINENUM_DESCRIPTOR FAR* lineDescArray,
                          U16 FAR*                numReturned);

/*****************************************************************************
** SymGetLineNumbersList
**
** Purpose:
**    Get the specified number of linenumber descriptors adjacent to the
**    input <lineDesc>. Fill the linenum descriptors into the supplied
**    lineDescArray. Return the actual number of descriptors filling in.
**
** Input parameter:
**    moduleDesc:   module contained the line numbers   
**    lineDesc:     start linenumber descriptor
**    numRequested: number of requested linenumbers.
**
** Output parameter:
**    lineDescArray: a caller supplied linenumber descriptor array -
**                   lineDescArray[numRequested].
**    numReturned:  actual number of line returned.              
**
** Error:
**    Returns error if no line numbers existed for the <moduleDesc>.
**
*****************************************************************************/
RETCODE WINAPI
SymGetLineNumbersList(SYM_DESCRIPTOR          moduleDesc,
                      LINENUM_DESCRIPTOR      startLineDesc,
                      U16                     numRequested,
                      LINENUM_DESCRIPTOR FAR* lineDescArray,
                      U16 FAR*                numReturned);

#ifdef __cplusplus
}
#endif

#define _SYMBLEXT_
#endif /* _SYMBLEXT_ */
/******************************** E O F *************************************/
