home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************************/
- /* */
- /* Module Name: GetDNStatus */
- /* */
- /* File Name: GetDNStatus.c */
- /* */
- /* © Apple Computer, Inc. 1994-1995 */
- /* All Rights Reserved */
- /* */
- /* Revision History: */
- /* */
- /* Date Who Modification */
- /* */
- /* 1994-10-27 Jaakko Railo Original version */
- /* */
- /************************************************************************************************/
-
- /****************************************** DESCRIPTION ******************************************
-
- *************************************************************************************************/
-
- /******************************************** HEADERS *******************************************/
-
- #ifndef __TELEPHONES__
- #include "Telephones.h"
- #endif
-
- #include "TestModule.h"
-
- /****************************************** DEFINITIONS *****************************************/
-
- /****************************************** PROTOTYPES ******************************************/
-
- void DoTest (CHRSPtr paramPtr);
-
- /************************************************************************************************/
- /************************************************************************************************/
-
-
- pascal short TestModule (CHRSPtr paramPtr)
- {
- short returnValue = noErr;
-
- if (paramPtr->version <= kTestModuleVersion) {
-
- DoTest (paramPtr);
-
- }
- else
- returnValue = kWrongVersion;
-
- return (returnValue);
- }
-
-
- void DoTest (CHRSPtr paramPtr)
- {
- TELHandle termHand = GetCurrentTELHandle (paramPtr);
- TELDNHandle dnHand;
- OSErr errCode;
- long inUse;
- char * array[] = { "telDNNotUsed",
- "telDNPOTSCall",
- "telDNFaxCall",
- "telDNDataCall",
- "telDNAlerting",
- "telDNUnkonwnState"
- };
-
- if ((dnHand = GetDNHandle (paramPtr)) != nil) {
- if ((errCode = TELGetDNStatus (dnHand, &inUse)) == noErr)
- Print (paramPtr, "TELGetDNStatus --> inUse = %s", array[inUse]);
- else
- Print (paramPtr, "### TELGetDNStatus failed : %d", errCode);
- }
- else
- Print (paramPtr, "### Unable to retrieve the DN handle");
- }
-