gc_ResultInfo( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_ResultInfo(*a_Metaevent, a_Info) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_ResultInfo( ) function retrieves information about Global Call events. Calling the gc_ResultInfo( ) function is equivalent to calling the gc_ResultValue( ), gc_ResultMsg( ), and gc_CCLibNameToID( ) functions in turn. To retrieve the information, the gc_ResultInfo( ) function must be called immediately after a Global Call event arrives and before the next event is requested.
If the application gets an event, the gcValue or ccValue field of the GC_INFO structure identifies the cause of the event to which the a_Metaevent parameter points. This pointer is acquired by the gc_GetMetaEvent( ) or gc_GetMetaEventEx( ) function.
a_Metaevent points to the metaevent associated with this event a_Info points to the GC_INFO structure where information about the event is contained. See GC_INFO for more information. Termination Events
Cautions
- The gc_ResultInfo( ) function can be called only in the same thread in which the event was retrieved and before the next Global Call event is received.
- Do not overwrite the message space pointed to by any of the char* fields in GC_INFO as these point to private internal space.
- The lifetime of the strings pointed to by the GC_INFO data structure is from the time the gc_ResultInfo( ) function returns to the time the next event is requested.
Errors
If the gc_ResultInfo( ) function fails, error analysis should not be done by calling either the gc_ErrorInfo( ) or gc_ErrorValue( ) function. A failure return generally indicates that a_Info is NULL.
Example
/* -- This function can be called anytime after a GlobalCall event has occurred -- This procedure prints the result information to the console with no other side effects */ void PrintResultInfo(METAEVENT *a_metaeventp) { int retCode; GC_INFO t_Info; GC_INFO gc_error_info; /* GlobalCall error information data */ retCode = gc_ResultInfo(a_metaeventp, &t_Info); if (retCode == GC_SUCCESS) { printf("gc_ResultInfo() successfully called\n"); PrintGC_INFO(&t_Info); } else { printf("gc_ResultInfo() call failed\n"); } } /* -- This function is called to print GC_INFO to the system console -- Typically it would be called after a call to gc_ErrorInfo() -- or gc_ResultInfo() to print the resulting GC_INFO data structure */ void PrintGC_INFO(GC_INFO *a_Info) { printf("a_Info->gcValue = 0x%x\n", a_Info->gcValue); printf("a_Info->gcMsg = %s\n", a_Info->gcMsg); printf("a_Info->ccLibId = %d\n", a_Info->ccLibId); printf("a_Info->ccLibName = %s\n", a_Info->ccLibName); printf("a_Info->ccValue = 0x%x\n", a_Info->ccValue); printf("a_Info->ccMsg = %s\n", a_Info->ccMsg); printf("a_Info->additionalInfo = %s\n", a_Info->additionalInfo); printf("Enter <CR> to continue: "); getchar(); }See Also
- gc_ResultValue( ) (deprecated)
- gc_ResultMsg( ) (deprecated)
- gc_CCLibIDToName( )
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation