gc_CCLibStatus( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_CCLibStatus(cclib_name, cclib_infop) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
- Note: The gc_CCLibStatus( ) function is deprecated in this release. The suggested equivalent is gc_CCLibStatusEx( ).
The gc_CCLibStatus( ) function retrieves the status of a single call control library specified by the cclib_name parameter. The status of a library can be available, configured, or failed. This status information is stored in *cclib_infop.
cclib_name name of the call control library. See gc_CCLibNameToID( ) for valid call control library names. The string must be set to one of these names and terminated by a NULL. cclib_infop points to location of status information. The status information is a bitmask with an available or configured mask set (these masks are mutually exclusive) and/or a failed mask: Termination Events
Cautions
If an invalid cclib_name is passed to the gc_CCLibStatus( ) function, the function will not return <0 to indicate failure; the information stored in cclib_infop 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 print_cclib_status(char *lib_name) { int lib_status; /* state of call control library */ GC_INFO gc_error_info; /* GlobalCall error information data */ if (gc_CCLibStatus(lib_name, &lib_status) == GC_SUCCESS) { printf("cclib %s status:\n", lib_name); printf(" configured: %s\n", (lib_status & GC_CCLIB_CONFIGURED) ? "yes" : "no"); printf(" available: %s\n", (lib_status & GC_CCLIB_AVAILABLE) ? "yes" : "no"); printf(" failed: %s\n", (lib_status & GC_CCLIB_FAILED) ? "yes" : "no"); } else { /* process error return as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_CCLibStatus)(), 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
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation