PREV TOC HOME INDEX NEXT


gc_CCLibNameToID( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_CCLibNameToID(lib_name, cclibidp)
Inputs:

char *lib_name

  • pointer to name of library
 

int *cclibidp

  • pointer to location of library identification code
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

library information

Mode:

synchronous

Platform and Technology:

All

Description

The gc_CCLibNameToID( ) function converts call control library name to ID code. The library identification code associated with the call control library, lib_name, is written into *cclibidp.

Parameter

Description

lib_name name of the call control library whose library ID is to be retrieved. Valid call control library names are:
  • "GC_ALL_LIB"
    All call control libraries
  • "GC_ANAPI_LIB"
    ANAPI call control library
  • "GC_CUSTOM1_LIB"
    Custom call control library 1
  • "GC_CUSTOM2_LIB"
    Custom call control library 2
  • "GC_DM3CC_LIB
    DM3CC call control library
  • "GC_ICAPI_LIB"
    ICAPI call control library
  • "GC_IPM_LIB"
    IP_Media call control library
  • "GC_ISDN_LIB"
    ISDN call control library
  • "GC_PDKRT_LIB"
    PDKRT call control library
  • "GC_SS7_LIB"
    SS7 call control library
cclibidp points to identification code of call control library

Termination Events

None

Cautions

If an invalid lib_name is passed to the gc_CCLibNameToID( ) function, the function will not return <0 to indicate failure; the information stored in cclibidp will remain unchanged (for example, 0).

Errors

If this function returns <0 to indicate failure, use the gc_ErrorInfo( ) function to retrieve the reason for the error. See the "Error Handling" section in the Global Call API Programming Guide. All Global Call error codes are defined in the gcerr.h file. If the error returned is technology specific, see the technology-specific error header file(s) for the error definition (for example, ccerr.h or isdnerr.h file for the ISDN call control library).

Example

#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h> 
int cclibname_to_id(char *lib_name, int *cclibidp)
{
   GC_INFO         gc_error_info;    /* GlobalCall error information data */ 
    if (gc_CCLibNameToID(lib_name, cclibidp) != GC_SUCCESS) {
        /* process error return as shown */
        gc_ErrorInfo( &gc_error_info );
        printf ("Error: gc_CCLibNameToID(), libname: %s, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",
               lib_name, gc_error_info.gcValue, gc_error_info.gcMsg, 
               gc_error_info.ccLibId, gc_error_info.ccLibName,
               gc_error_info.ccValue, gc_error_info.ccMsg);
        return (gc_error_info.gcValue); 
    }
    return(0);
} 

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated February, 2003