home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Telephone Manager / Stiletto Sources / ModuleSources / CountCAs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-26  |  2.4 KB  |  74 lines  |  [TEXT/MPS ]

  1. /************************************************************************************************/
  2. /*                                                                                                */
  3. /*    Module Name:    CountCAs                                                                    */
  4. /*                                                                                                */
  5. /*    File Name:        CountCAs.c                                                                    */
  6. /*                                                                                                */
  7. /*    © Apple Computer, Inc. 1991-1995                                                            */
  8. /*    All Rights Reserved                                                                            */
  9. /*                                                                                                */
  10. /*    Revision History:                                                                            */
  11. /*                                                                                                */
  12. /*        Date        Who                    Modification                                            */
  13. /*                                                                                                */
  14. /*        1991-07-16    Chris Halim            Original version                                        */
  15. /*        1995-06-26    Jaakko Railo        Version 2.0                                                */
  16. /*                                                                                                */
  17. /************************************************************************************************/
  18.  
  19. /****************************************** DESCRIPTION ******************************************
  20.  
  21. This module calls TELCountCAs with different IntExt parameter.
  22.  
  23. *************************************************************************************************/
  24.  
  25. /******************************************** HEADERS *******************************************/
  26.  
  27. #include "TestModule.h"
  28.  
  29. /****************************************** DEFINITIONS *****************************************/
  30.  
  31. /****************************************** PROTOTYPES ******************************************/
  32.  
  33. void         DoTest (CHRSPtr paramPtr);
  34.  
  35. /************************************************************************************************/
  36. /************************************************************************************************/
  37.  
  38.  
  39. pascal short TestModule (CHRSPtr paramPtr)
  40. {
  41.     short    returnValue = noErr;
  42.     
  43.     if (paramPtr->version <= kTestModuleVersion) {
  44.         
  45.         DoTest (paramPtr);
  46.         
  47.     }
  48.     else
  49.         returnValue = kWrongVersion;
  50.         
  51.     return (returnValue);
  52. }
  53.  
  54.  
  55. void DoTest (CHRSPtr paramPtr)
  56. {
  57.     TELHandle        termHand = GetCurrentTELHandle (paramPtr);
  58.     TELDNHandle        dnHand;
  59.     short            numOfCAs;
  60.         
  61.     if ((dnHand = GetDNHandle (paramPtr)) != nil) {
  62.         numOfCAs = TELCountCAs (dnHand, telAllCallOrigins);
  63.         Print (paramPtr, "Number of CAs found (telAllCallOrigins) = %d", numOfCAs);
  64.         numOfCAs = TELCountCAs (dnHand, telInternalCall);
  65.         Print (paramPtr, "Number of CAs found (telInternalCall) = %d", numOfCAs);
  66.         numOfCAs = TELCountCAs (dnHand, telExternalCall);
  67.         Print (paramPtr, "Number of CAs found (telExternalCall) = %d", numOfCAs);        
  68.     }
  69.     else
  70.         Print (paramPtr, "### Unable to retrieve the DN handle");
  71. }
  72.  
  73.  
  74.