Telephones.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:78k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Telephones.h
  3.  
  4.      Contains:   Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology: System 7.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __TELEPHONES__
  18. #define __TELEPHONES__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __DIALOGS__
  23. #include "Dialogs.h"
  24. #endif
  25. #ifndef __MACERRORS__
  26. #include "MacErrors.h"
  27. #endif
  28. #ifndef __EVENTS__
  29. #include "Events.h"
  30. #endif
  31. #ifndef __CTBUTILITIES__
  32. #include "CTBUtilities.h"
  33. #endif
  34. #ifndef __COMPONENTS__
  35. #include "Components.h"
  36. #endif
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53. #if CALL_NOT_IN_CARBON
  54. enum {
  55.     curTELVersion               = 3,                            /* current Telephone Manager version */
  56.                                                                 /*    the chooseXXX symbols are defined in CTBUtilities.(pah) */
  57.     telChooseDisaster           = chooseDisaster,
  58.     telChooseFailed             = chooseFailed,
  59.     telChooseAborted            = chooseAborted,
  60.     telChooseOKMinor            = chooseOKMinor,
  61.     telChooseOKMajor            = chooseOKMajor,
  62.     telChooseCancel             = chooseCancel,
  63.     telChooseOKTermChanged      = 4
  64. };
  65. #ifndef classTEL
  66. enum {
  67.                                                                 /* telephone tool file type */
  68.     classTEL                    = FOUR_CHAR_CODE('vbnd')
  69. };
  70. #endif  /* !defined(classTEL) */
  71. enum {
  72.                                                                 /* PHYSICAL TERMINAL CONSTANTS */
  73.                                                                 /* INDEPENDENT HANDSET CONSTANTS */
  74.     telIndHSOnHook              = 0,                            /* independent handset on hook */
  75.     telIndHSOffHook             = 1,                            /* independent handset off hook */
  76.     telIndHSDisconnected        = 0,                            /* handset disconnected from the line */
  77.     telIndHSConnected           = 1,                            /* handset connected to the line */
  78.                                                                 /* HOOK STATE CONSTANTS */
  79.     telHandset                  = 1,                            /* handset hookswitch */
  80.     telSpeakerphone             = 2,                            /* speakerphone 'on' switch */
  81.     telDeviceOffHook            = 1,                            /* device off hook */
  82.     telDeviceOnHook             = 0,                            /* device on hook */
  83.                                                                 /* VOLUME CONTROL CONSTANTS */
  84.     telHandsetSpeakerVol        = 1,                            /* volume of the handset speaker */
  85.     telHandsetMicVol            = 2,                            /* sensitivity of the handset mic */
  86.     telSpeakerphoneVol          = 3,                            /* speakerphone volume */
  87.     telSpeakerphoneMicVol       = 4,                            /* sensitivity of the spkrphone mic */
  88.     telRingerVol                = 5,                            /* volume of the ringer */
  89.     telBuiltinSPVol             = 6,                            /* volume of the built-in speakerphone */
  90.     telBuiltinSPMicVol          = 7,                            /* sensitivity of the built-in speakerphone mic */
  91.     telVolSame                  = 0,                            /* leaves the volume at previous level */
  92.     telVolMin                   = 1,                            /* turns volume down to minimum level, but not off */
  93.     telVolMax                   = 100,                          /* highest level allowed by the Telephone Manager */
  94.     telVolStateSame             = 0,                            /* leaves device in same state */
  95.     telVolStateOff              = 1,                            /* turns the device off , */
  96.                                                                 /* but doesn't change the volume setting. */
  97.                                                                 /* Use for mute functions. */
  98.     telVolStateOn               = 2,                            /* turns the device on.  Volume setting is */
  99.                                                                 /* the same as previously set.*/
  100.                                                                 /* DISPLAY CONSTANTS */
  101.     telNormalDisplayMode        = 1,                            /* normal display mode */
  102.     telInspectMode              = 2,                            /* inspect display mode */
  103.     telMiscMode                 = 3,                            /* miscellaneous display mode */
  104.     telRetrieveMode             = 4,                            /* message retrieval mode */
  105.     telDirectoryQueryMode       = 5,                            /* electronic directory mode */
  106.     telEntireDisplay            = 0,                            /* entire Display */
  107.                                                                 /* KEY PRESS CONSTANTS */
  108.     telHangupKey                = 1,                            /* drop, or release, key pressed */
  109.     telHoldKey                  = 2,                            /* hold key pressed */
  110.     telConferenceKey            = 3,                            /* conference key pressed */
  111.     telTransferKey              = 4,                            /* transfer key pressed */
  112.     telForwardKey               = 5,                            /* call forward key pressed */
  113.     telCallbackKey              = 6,                            /* call back key pressed */
  114.     telDNDKey                   = 7,                            /* do not disturb key pressed */
  115.     telCallPickupKey            = 8,                            /* call Pickup key pressed */
  116.     telCallParkKey              = 9,                            /* call Park key pressed */
  117.     telCallDeflectKey           = 10,                           /* call Deflect key pressed */
  118.     telVoiceMailAccessKey       = 11,                           /* voice Mail Access key pressed */
  119.     telCallRejectKey            = 12,                           /* call Reject key pressed */
  120.     telOtherKey                 = 16,                           /* other key pressed */
  121.     telKeyPadPress              = 1,                            /* key pressed on 12 digit keypad*/
  122.     telFeatureKeyPress          = 2,                            /* feature Key Pressed */
  123.     telTerminalEnabled          = 0,
  124.     telTerminalDisabled         = 1,
  125.     telUnknown                  = 0,                            /* unknown error */
  126.     telTerminalHWDisconnected   = 1,                            /* terminal hardware is disconnected */
  127.     telDeviceDriverClosed       = 2,                            /* device driver is closed */
  128.                                                                 /* ALERT PATTERN */
  129.     telPattern0                 = 0,
  130.     telPattern1                 = 1,
  131.     telPattern2                 = 2,
  132.     telPattern3                 = 3,
  133.     telPattern4                 = 4,
  134.     telPattern5                 = 5,
  135.     telPattern6                 = 6,
  136.     telPattern7                 = 7,
  137.     telPatternOff               = 8,
  138.     telPatternUndefined         = 15,                           /* DN TYPES */
  139.     telAllDNs                   = 0,                            /* counts all types of DNs */
  140.     telInternalDNs              = 1,                            /* connected to PBX or other non-public switch */
  141.     telInternalDNsOnly          = 2,                            /* connected to PBX or other non-public switch */
  142.                                                                 /* and able to place internal calls only */
  143.     telExternalDNs              = 3,                            /* connected to public network */
  144.     telDNTypeUnknown            = 4,                            /* DN type unknown */
  145.                                                                 /* DN USAGE */
  146.     telDNNotUsed                = 0,                            /* DN is not used - onhook */
  147.     telDNPOTSCall               = 1,                            /* DN used for POTs call */
  148.     telDNFaxCall                = 2,                            /* DN used for fax call */
  149.     telDNDataCall               = 3,                            /* DN used for data call */
  150.     telDNAlerting               = 4,                            /* Incoming call at DN */
  151.     telDNUnknownState           = 5,                            /* DN is in unknown state */
  152.                                                                 /* CALL FORWARDING TYPES */
  153.     telForwardImmediate         = 1,                            /* immediately forward calls */
  154.     telForwardBusy              = 2,                            /* forward on Busy */
  155.     telForwardNoAnswer          = 3,                            /* forward on No answer */
  156.     telForwardBusyNA            = 4,                            /* forwarding for busy and no answer*/
  157.     telForwardTypeUnknown       = 5,                            /* type of forwarding is unknown */
  158.                                                                 /* CALL FORWARDING MESSAGES */
  159.     telForwardCleared           = 0,                            /* forwarding has been cleared */
  160.     telForwardEst               = 1,                            /* forwarding has been established*/
  161.     telForwardFailed            = 2,                            /* attempt to setup forwarding has failed*/
  162.                                                                 /* DO NOT DISTURB TYPES */
  163.     telDNDIntExt                = 0,                            /* do not disturb for all internal and external calls*/
  164.     telDNDExternal              = 1,                            /* do not disturb for external calls only */
  165.     telDNDInternal              = 2,                            /* do not disturb for internal calls only */
  166.     telDNDNonIntercom           = 3,                            /* do not disturb for all calls except intercom */
  167.                                                                 /* DO NOT DISTURB MESSAGES */
  168.     telDNDCleared               = 0,                            /* do not disturb has been cleared */
  169.     telDNDEst                   = 1,                            /* do not disturb has been established */
  170.     telDNDFailed                = 2,                            /* attempt to setup do not disturb has failed */
  171.                                                                 /* VOICE MAIL MESSAGES */
  172.     telAllVoiceMessagesRead     = 0,                            /* all messages have been read, none are  waiting */
  173.                                                                 /* to be read */
  174.     telNewVoiceMessage          = 1,                            /* a new message has arrived or messages are waiting */
  175.                                                                 /* for this DN */
  176.                                                                 /* DNSELECT MESSAGE */
  177.     telDNDeselected             = 0,                            /* DN has been deselected */
  178.     telDNSelected               = 1,                            /* DN has been selected */
  179.                                                                 /* CALL ORIGINATORS */
  180.     telInternalCall             = 0,                            /* return nth internal CA */
  181.     telExternalCall             = 1,                            /* return nth external CA */
  182.     telUnknownCallOrigin        = 2,                            /* unknown call type */
  183.     telAllCallOrigins           = 2,                            /* return nth CA internal or external */
  184.                                                                 /* CALL TYPES */
  185.     telVoiceMailAccessOut       = (-7),
  186.     telPageOut                  = (-6),
  187.     telIntercomOut              = (-5),
  188.     telCallbackOut              = (-4),
  189.     telPickup                   = (-3),
  190.     telParkRetrieve             = (-2),
  191.     telNormalOut                = (-1),
  192.     telUnknownCallType          = 0,
  193.     telNormalIn                 = 1,
  194.     telForwardedImmediate       = 2,
  195.     telForwardedBusy            = 3,
  196.     telForwardedNoAnswer        = 4,
  197.     telTransfer                 = 5,
  198.     telDeflected                = 6,
  199.     telIntercepted              = 7,
  200.     telDeflectRecall            = 8,
  201.     telParkRecall               = 9,
  202.     telTransferredRecall        = 10,
  203.     telIntercomIn               = 11,
  204.     telCallbackIn               = 12,                           /* DIAL TYPES */
  205.     telDNDialable               = 0,                            /* this DN could be dialed via TELSetupCall */
  206.     telDNNorthAmerican          = 1,                            /* rmtDN is standard North America 10 digit number */
  207.     telDNInternational          = 2,                            /* rmtDN is an international number */
  208.     telDNAlmostDialable         = 3,                            /* rmtDN is almost dialable, */
  209.                                                                 /* missing prefix such as 9 or 1 */
  210.     telDNUnknown                = 15,                           /* unknown whether DN is dialable */
  211.                                                                 /* CALL PROGRESS MESSAGES */
  212.     telCAPDialTone              = 1,                            /* dial tone */
  213.     telCAPRinging               = 2,                            /* destination CA is alerting */
  214.     telCAPDialing               = 3,                            /* dialing the other end */
  215.     telCAPReorder               = 4,                            /* reorder */
  216.     telCAPBusy                  = 5,                            /* busy */
  217.     telCAPRouted                = 6,                            /* call routed; rmtDN will hold the routing directory */
  218.                                                                 /* number routeDN and routePartyName have been updated */
  219.     telCAPRoutedOff             = 7,                            /* call routed off-network; no further progress will */
  220.                                                                 /* be available */
  221.     telCAPTimeout               = 8,                            /* call timed out */
  222.     telCAPUpdate                = 9,                            /* name and rmtDN information has been updated */
  223.     telCAPPrompt                = 10,                           /* the network is prompting for more information */
  224.     telCAPWaiting               = 11,                           /* call is proceeding, but there is no response yet */
  225.                                                                 /* from the destination */
  226.     telCAPCPC                   = 12,                           /* telephone tool detected CPC signal */
  227.     telCAPNoDialTone            = 13,                           /* dial tone not detected */
  228.     telCAPUnknown               = 15,                           /* call progress state unknown */
  229.     telCAPDialDisabled          = 16,                           /* Blacklisting: Dial Disabled */
  230.     telCAPBlacklistedNumber     = 17,                           /* Blacklisting: Blacklisted Number */
  231.     telCAPForbiddenNumber       = 18,                           /* Blacklisting: Forbidden Number */
  232.     telCAPModemGuardTime        = 19,                           /* Modem Guard Timein force, unable to dial */
  233.     telCAPLCDetected            = 20,                           /* trying to dial a number while the handset is offhook */
  234.     telCAPLostLC                = 21,                           /* trying manual dial or answer while handset not off hook */
  235.                                                                 /* or also lost line current during dialing. */
  236.                                                                 /* OUTGOING CALL MESSAGES */
  237.     telPhysical                 = 0,                            /* user lifted handset and initiated call */
  238.     telProgrammatic             = 1,                            /* programmatic initiation of outgoing call */
  239.                                                                 /* DISCONNECT MESSAGES */
  240.     telLocalDisconnect          = 0,                            /* local party, this user, responsible for disconnect */
  241.     telRemoteDisconnect         = 1,                            /* remote party responsible for disconnect */
  242.                                                                 /* DISCONNECT TYPES */
  243.     telCADNormal                = 1,                            /* normal disconnect */
  244.     telCADBusy                  = 2,                            /* remote user busy */
  245.     telCADNoResponse            = 3,                            /* remote not responding */
  246.     telCADRejected              = 4,                            /* call rejected */
  247.     telCADNumberChanged         = 5,                            /* number changed */
  248.     telCADInvalidDest           = 6,                            /* invalid destination address */
  249.     telCADFacilityRejected      = 7,                            /* requested facility rejected */
  250.     telCADUnobtainableDest      = 9,                            /* destination not obtainable */
  251.     telCADCongested             = 10,                           /* network congestion */
  252.     telCADIncompatibleDest      = 11,                           /* incompatible destination */
  253.     telCADTimeout               = 12,                           /* call timed out */
  254.     telCADUnknown               = 15,                           /* reason unknown */
  255.                                                                 /* CONFERENCE MESSAGES */
  256.     telConferencePrepFailed     = 0,                            /* conference could not be prepared */
  257.     telConferencePending        = 1,                            /* conference prepared successfully */
  258.     telConferenceEstFailed      = 2,                            /* conference could not be established */
  259.     telConferenceEst            = 3,                            /* conference established */
  260.                                                                 /* TRANSFER MESSAGES */
  261.     telTransferPrepFailed       = 0,                            /* transfer could not be prepared */
  262.     telTransferPending          = 1,                            /* transfer prepared successfully */
  263.     telTransferEst              = 2,                            /* consult or blind xfer successful */
  264.     telTransferFailed           = 3,                            /* consult or blind xfer failed */
  265.     telTransferred              = 4,                            /* message to originator of CA specifying */
  266.                                                                 /* that call was transferred to rmtDN */
  267.                                                                 /* HOLD MESSAGES */
  268.     telHoldCleared              = 0,
  269.     telHoldEst                  = 1,
  270.     telHoldFailed               = 2,                            /* RECEIVE DIGIT MESSAGES */
  271.     telDigitAudible             = 0,
  272.     telDigitNotAudible          = 1,                            /* CALL PARK MESSAGES */
  273.     telCallParkEst              = 1,                            /* call has been successfully parked */
  274.     telCallParkRetrieveEst      = 2,                            /* parked Call has been successfully retrieved */
  275.     telCallParkFailed           = 3,                            /* attempt to setup call park has failed */
  276.     telCallParkRetrieveFailed   = 4,                            /* attempt to retrieve parked call failed */
  277.     telCallParkRecall           = 5,                            /* call park has been recalled */
  278.                                                                 /* CALL BACK MESSAGES */
  279.     telCallbackCleared          = 0,                            /* call back has been cleared */
  280.     telCallbackEst              = 1,                            /* call back has been established */
  281.     telCallbackNowAvail         = 2,                            /* call can be called back with TELCallBackNow */
  282.                                                                 /* if CA is zero, else call IS calling back on CA */
  283.     telCallbackFailed           = 3,                            /* attempt to setup callback has failed */
  284.     telCallbackDesired          = 4,                            /* a user has called this terminal, received no */
  285.                                                                 /* answer and desires this terminal to call it */
  286.                                                                 /* back */
  287.     telCallbackDesiredCleared   = 5,                            /* call back for no answer no longer desired */
  288.     telCalledback               = 6,                            /* callback has occurred successfully */
  289.                                                                 /* CALL REJECT MESSAGES */
  290.     telCallRejectFailed         = 0,                            /* attempt to reject call has failed */
  291.     telCallRejectEst            = 1,                            /* call successfully rejected */
  292.     telCallRejected             = 2,                            /* message to originator that call was rejected */
  293.                                                                 /* CALL DEFLECT MESSAGES */
  294.     telCallDeflectFailed        = 0,                            /* attempt to deflect call has failed */
  295.     telCallDeflectEst           = 1,                            /* call successfully deflected */
  296.     telCallDeflectRecall        = 2,                            /* deflected call has been recalled */
  297.     telCallDeflected            = 3,                            /* message to originator that call was deflected */
  298.                                                                 /* to rmtDN */
  299.     telAutoDeflectImmediate     = 4,                            /* a call was automatically deflected from this */
  300.                                                                 /* terminal as a result of immediate call */
  301.                                                                 /* forwarding */
  302.     telAutoDeflectBusy          = 5,                            /* a call was automatically deflected from this */
  303.                                                                 /* terminal as a result of call forwarding on busy */
  304.     telAutoDeflectNoAnswer      = 6,                            /* a call was automatically deflected from this */
  305.                                                                 /* terminal as a result of call forwarding on */
  306.                                                                 /* no answer */
  307.                                                                 /* CONFERENCE SPLIT MESSAGES */
  308.     telConferenceSplitFailed    = 0,                            /* CA could not be split */
  309.     telConferenceSplitEst       = 1,                            /* CA split successfully */
  310.                                                                 /* CONFERENCE DROP MESSAGES */
  311.     telConferenceDropFailed     = 0,                            /* CA could not be dropped */
  312.     telConferenceDropped        = 1,                            /* CA dropped successfully */
  313.                                                                 /* CALL PICKUP MESSAGES */
  314.     telCallPickupEst            = 0,                            /* call pickup was successful */
  315.     telCallPickupFailed         = 1,                            /* call pickup failed */
  316.     telCallPickedUp             = 2,                            /* message to originator that call was picked */
  317.                                                                 /* up at a different DN */
  318.                                                                 /* PAGING MESSAGES */
  319.     telPageEst                  = 0,                            /* paging was successful */
  320.     telPageComplete             = 1,                            /* paging activity completed */
  321.     telPageFailed               = 2,                            /* paging failed */
  322.                                                                 /* INTERCOM MESSAGES */
  323.     telIntercomEst              = 0,                            /* intercom was successful */
  324.     telIntercomComplete         = 1,                            /* intercom activity completed */
  325.     telIntercomFailed           = 2,                            /* intercom failed */
  326.                                                                 /* MODEM TONE MESSAGES */
  327.     telModemToneDetected        = 0,                            /* modem tone was detected */
  328.     telModemToneCleared         = 1,                            /* modem tone went away */
  329.                                                                 /* FAX TONE MESSAGES */
  330.     telFaxToneDetected          = 0,                            /* fax tone was detected */
  331.     telFaxToneCleared           = 1,                            /* fax tone went away */
  332.                                                                 /* IN USE MESSAGES */
  333.     telInUsePrivate             = 0,                            /* MADN is in use and can't be accessed */
  334.     telInUseCanAccess           = 1,                            /* MADN is in use, and others can access it */
  335.                                                                 /* and join in */
  336.     telInUseCanMakePrivate      = 2,                            /* MADN is in use, but available for any one */
  337.                                                                 /* person to access */
  338.     telInUseCleared             = 3,                            /* MADN is no longer in use */
  339.                                                                 /* CALL APPEARANCE STATES */
  340.     telCAIdleState              = 0,                            /* a call doesn't exist at this time */
  341.     telCAInUseState             = 1,                            /* the call is active but at another terminal */
  342.     telCAOfferState             = 2,                            /* a call is being offered to the terminal */
  343.     telCAQueuedState            = 3,                            /* a call is being queued at this terminal */
  344.     telCAAlertingState          = 4,                            /* a call is alerting at the terminal */
  345.     telCADialToneState          = 5,                            /* initiated outgoing call has dialtone */
  346.     telCADialingState           = 6,                            /* initiated outgoing call is dialing */
  347.     telCAWaitingState           = 7,                            /* initiated outgoing call is waiting for */
  348.                                                                 /* response from destination */
  349.     telCARingingState           = 8,                            /* the outgoing call is ringing. */
  350.     telCABusyState              = 9,                            /* destination is busy or can't be reached */
  351.     telCAHeldState              = 10,                           /* call has been put on hold by this terminal */
  352.     telCAConferencedState       = 11,                           /* this CA is part of a conference now */
  353.     telCAActiveState            = 12,                           /* the call is active and parties are free */
  354.                                                                 /* to exchange data */
  355.     telCAReorderState           = 13,                           /* CA is in a reorder state */
  356.     telCAConferencedHeldState   = 14,                           /* CA is a conference call in a held state */
  357.     telCAUnknownState           = 15,                           /* the call state is unknown */
  358.                                                                 /* TERMINAL MESSAGE EVENTMASKS */
  359.     telTermHookMsg              = 0x00000001,                   /* the hookswitch state has changed */
  360.     telTermKeyMsg               = 0x00000002,                   /* a phone pad key has been depressed */
  361.     telTermVolMsg               = 0x00000004,                   /* volume setting has changed */
  362.     telTermDisplayMsg           = 0x00000008,                   /* display has changed */
  363.     telTermEnableMsg            = 0x00000010,                   /* terminal has become enabled */
  364.     telTermOpenMsg              = 0x00000020,                   /* terminal has been opened */
  365.     telTermCloseMsg             = 0x00000040,                   /* terminal is shutting down */
  366.     telTermResetMsg             = 0x00000080,                   /* terminal has been reset */
  367.     telTermErrorMsg             = 0x00000100,                   /* hard equipment error */
  368.     telTermIndHSStateChgMsg     = 0x00000200,                   /* change in handset state from inacive to */
  369.                                                                 /* active or vice versa */
  370.     telTermIndHSConnectMsg      = 0x00000400,                   /* independent handset connection has been changed */
  371.     telTermKeyImmMsg            = 0x00000800,                   /* immidiate arrival of phone pad key */
  372.     telTermVolStateMsg          = 0x00001000,                   /* volume state has changed */
  373.     telTermOtherMsg             = (long)0x80000000,             /* vendor defined error */
  374.     telAllTermMsgs              = 0x00001FFF,                   /* mask to all non tool specific terminal events */
  375.                                                                 /* DN MESSAGE EVENTMASK CONSTANTS */
  376.     telDNForwardMsg             = 0x00000001,                   /* forward feature activity */
  377.     telDNDNDMsg                 = 0x00000002,                   /* do not disturb feature activity */
  378.     telDNVoiceMailMsg           = 0x00000004,                   /* message has arrived for this DN */
  379.     telDNSelectedMsg            = 0x00000008,                   /* DN has been selected or deselected */
  380.     telDNOtherMsg               = (long)0x80000000,             /* a custom message for use by tools */
  381.     telAllDNMsgs                = 0x0000000F,                   /* mask to all non tool specific dn events */
  382.                                                                 /* CA MESSAGE EVENTMASK CONSTANTS */
  383.     telCAAlertingMsg            = 0x00000001,                   /* CA is alerting  */
  384.     telCAOfferMsg               = 0x00000002,                   /* CA is being offered a call */
  385.     telCAProgressMsg            = 0x00000004,                   /* call progress info for this CA */
  386.     telCAOutgoingMsg            = 0x00000008,                   /* CA is initiating an outgoing call */
  387.     telCADisconnectMsg          = 0x00000010,                   /* CA disconnected (dropped or rmt disc */
  388.     telCAActiveMsg              = 0x00000020,                   /* CA is active and voice/data is free */
  389.                                                                 /* to flow end to end */
  390.     telCAConferenceMsg          = 0x00000040,                   /* conference activity on CA */
  391.     telCATransferMsg            = 0x00000080,                   /* transfer feature activity */
  392.     telCAHoldMsg                = 0x00000100,                   /* hold feature activity */
  393.     telCADigitsMsg              = 0x00000200,                   /* remote signaling digits arrived */
  394.     telCACallParkMsg            = 0x00000400,                   /* CA call park feature activity */
  395.     telCACallbackMsg            = 0x00000800,                   /* CA call back feature activity  */
  396.     telCARejectMsg              = 0x00001000,                   /* CA is rejected */
  397.     telCADeflectMsg             = 0x00002000,                   /* CA is deflected */
  398.     telCAForwardMsg             = 0x00004000,                   /* CA is forwarded to this DN  */
  399.     telCAConferenceSplitMsg     = 0x00008000,                   /* conference split activity  */
  400.     telCAConferenceDropMsg      = 0x00010000,                   /* conference drop activity  */
  401.     telCAQueuedMsg              = 0x00020000,                   /* CA has been queued  */
  402.     telCAInUseMsg               = 0x00040000,                   /* CA is in use  */
  403.     telCACallPickupMsg          = 0x00080000,                   /* CA pickup activity */
  404.     telCAPagingMsg              = 0x00100000,                   /* CA paging activity */
  405.     telCAIntercomMsg            = 0x00200000,                   /* CA intercom activity */
  406.     telCAModemToneMsg           = 0x00400000,                   /* modem tones detected */
  407.     telCAFaxToneMsg             = 0x00800000,                   /* fax tones detected */
  408.     telCAIdleMsg                = 0x01000000,                   /* CA is in idle state */
  409.     telCASuccessiveAlertMsg     = 0x02000000,                   /* phone is alerting, one per ring */
  410.     telCAUserUserInfoMsg        = 0x04000000,                   /* user to user information has arrrived */
  411.                                                                 /* for this CA */
  412.     telCAHandOffMsg             = 0x08000000,                   /* CA is ready for hand-off */
  413.     telCAVoiceDetectedMsg       = 0x10000000,                   /* voice Detect related event */
  414.     telCASilenceDetectedMsg     = 0x20000000,                   /* silence Detect related event */
  415.     telCADigitsImmMsg           = 0x40000000,                   /* immidiate arrival of remote signaling digits */
  416.     telCAOtherMsg               = (long)0x80000000,             /* tool specific CA message */
  417.     telAllCAMsgs                = 0x7FFFFFFF                    /* mask to all non tool specific CA events */
  418. };
  419. typedef OSErr                           TELErr;
  420. typedef unsigned long                   TELFlags;
  421. enum {
  422.     telNoMenus                  = 1L << 16,                     /* tells tool not to display any custom menus */
  423.     telQuiet                    = 1L << 17,                     /* tells tool not to display any dialog boxes or alerts */
  424.     telConfigChanged            = 1L << 18                      /* notifies application that the config has changed */
  425. };
  426. typedef unsigned long                   TELFeatureFlags;
  427. enum {
  428.     pcmAvail                    = 1L << 0,                      /* true if PCM voice data accessible */
  429.     hasHandset                  = 1L << 1,                      /* true if a phone handset is attached  */
  430.     hasSpeakerphone             = 1L << 2,                      /* true if a 2 way speakerphone is attached */
  431.     canOnHookDial               = 1L << 3,                      /* can on-hook dial */
  432.     hasRinger                   = 1L << 4,                      /* terminal has its own ringer */
  433.     canSetDisplay               = 1L << 5,                      /* application can write to the display */
  434.     hasKeypad                   = 1L << 6,                      /* attached phone has standard 12 key pad */
  435.     hasVideo                    = 1L << 7,                      /* terminal has a videophone */
  436.     hasOther                    = 1L << 8,                      /* reserved for future use */
  437.     crossDNConference           = 1L << 9,                      /* can perform cross-DN conferences */
  438.     hasSubaddress               = 1L << 10,                     /* attached network supports subaddressing */
  439.     hasUserUserInfo             = 1L << 11,                     /* network supports user-to-user info */
  440.     hasHandsetSoundStreams      = 1L << 12,                     /* sound streams are supported on the handset */
  441.     hasIndHandset               = 1L << 13,                     /* handset can be accessed independently of the phone line */
  442.     hasBuiltinSpeakerphone      = 1L << 14                      /* speaker and microphone of the Mac can be used */
  443. };
  444. struct TELTermRecord {
  445.     short                           tRef;
  446.     TELFeatureFlags                 featureFlags;
  447.     short                           handsetSpeakerVol;
  448.     short                           handsetMicVol;
  449.     short                           speakerphoneVol;
  450.     short                           speakerphoneMicVol;
  451.     short                           ringerVol;
  452.     short                           otherVol;
  453.     short                           ringerTypes;
  454.     short                           hasDisplay;
  455.     short                           displayRows;
  456.     short                           numDNs;
  457.     short                           maxAllocCA;
  458.     short                           curAllocCA;
  459.     short                           builtinSpeakerVol;
  460.     short                           builtinSpeakerMicVol;
  461.     long                            reserved;
  462. };
  463. typedef struct TELTermRecord            TELTermRecord;
  464. typedef TELTermRecord *                 TELTermPtr;
  465. struct TELRecord {
  466.     short                           procID;
  467.     TELFlags                        flags;
  468.     short                           reserved;
  469.     long                            refCon;
  470.     long                            userData;
  471.     UniversalProcPtr                defproc;
  472.     Ptr                             config;
  473.     Ptr                             oldConfig;
  474.     TELTermPtr                      pTELTerm;
  475.     long                            telPrivate;
  476.     long                            reserved1;
  477.     long                            reserved2;
  478.     long                            pTELTermSize;
  479.     short                           version;
  480. };
  481. typedef struct TELRecord                TELRecord;
  482. typedef TELRecord *                     TELPtr;
  483. typedef TELPtr *                        TELHandle;
  484. typedef unsigned long                   TELDNFeatureFlags;
  485. enum {
  486.     dndSub                      = 1L << 0,                      /* do not disturb subscribed */
  487.     dndAvail                    = 1L << 1,                      /* do not disturb available */
  488.     dndActive                   = 1L << 2,                      /* do not disturb active */
  489.     voiceMailAccessSub          = 1L << 3,                      /* message waiting subscribed */
  490.     voiceMailAccessAvail        = 1L << 4,                      /* message waiting available */
  491.     voiceMailAccessActive       = 1L << 5,                      /* message waiting active */
  492.     pagingSub                   = 1L << 6,                      /* paging is subscribed */
  493.     pagingAvail                 = 1L << 7,                      /* paging is available */
  494.     pagingActive                = 1L << 8,                      /* paging is active */
  495.     intercomSub                 = 1L << 9,                      /* intercom is subscribed */
  496.     intercomAvail               = 1L << 10,                     /* intercom is available */
  497.     intercomActive              = 1L << 11,                     /* intercom is active */
  498.     dnSelectSub                 = 1L << 12,                     /* DN select is subscribed */
  499.     dnSelectAvail               = 1L << 13,                     /* DN select is available */
  500.     dnSelectActive              = 1L << 14,                     /* DN is selected */
  501.     callPickupSub               = 1L << 15,                     /* call pickup is subscribed */
  502.     callPickupAvail             = 1L << 16,                     /* call pickup is available */
  503.     dnInUse                     = 1L << 17,                     /* a CA is allocated for this DN */
  504.     logicalDN                   = 1L << 18,                     /* this DN is not on this terminal */
  505.     dnAccessible                = 1L << 19,                     /* commands can be sent to this DN */
  506.     canInitiate                 = 1L << 20,                     /* an outgoing CA can be initiated */
  507.     voiceMessageWaiting         = 1L << 21,                     /* voice mail waiting for this dn */
  508.     hasDNSoundStreams           = 1L << 22,                     /* sound streams are supported on this DN */
  509.     autoAnswerAvail             = 1L << 23,                     /* AutoAnswer is set for this DN */
  510.     autoAnswerActive            = 1L << 24,                     /* AutoAnswer is currently applied to CA on this DN */
  511.     tollSaverAvail              = 1L << 25,                     /* tollSaver is set for this DN */
  512.     tollSaverActive             = 1L << 26                      /* tollSaver is currently applied to CA on this DN */
  513. };
  514. typedef unsigned long                   TELDNForwardFlags;
  515. enum {
  516.     immediateForwardSub         = 1L << 0,                      /* immediate call forward subscribed */
  517.     immediateForwardAvail       = 1L << 1,                      /* immediate call forward available */
  518.     immediateForwardActive      = 1L << 2,                      /* immediate call forward active */
  519.     busyForwardSub              = 1L << 3,                      /* forward on busy subscribed */
  520.     busyForwardAvail            = 1L << 4,                      /* forward on busy available */
  521.     busyForwardActive           = 1L << 5,                      /* forward on busy active */
  522.     noAnswerForwardSub          = 1L << 6,                      /* no answer call forward subscribed */
  523.     noAnswerForwardAvail        = 1L << 7,                      /* no answer call forward available */
  524.     noAnswerForwardActive       = 1L << 8,                      /* no answer call forward active */
  525.     busyNAForwardSub            = 1L << 9,                      /* busy & no answer call forward subscribed */
  526.     busyNAForwardAvail          = 1L << 10,                     /* busy & no answer call forward available */
  527.     busyNAForwardActive         = 1L << 11                      /* busy & no answer call forward active */
  528. };
  529. struct TELDNRecord {
  530.     short                           dnRef;
  531.     StringPtr                       dn;
  532.     StringPtr                       dnPartyName;
  533.     StringPtr                       dnSubaddress;
  534.     TELHandle                       hTEL;
  535.     short                           maxAllocCA;
  536.     short                           curAllocCA;
  537.     short                           dnType;
  538.     TELDNFeatureFlags               featureFlags;
  539.     short                           numPageIDs;
  540.     short                           numIntercomIDs;
  541.     short                           numPickupIDs;
  542.     TELDNForwardFlags               forwardFlags;
  543.     StringPtr                       iForwardDN;
  544.     StringPtr                       iForwardSubaddress;
  545.     StringPtr                       iForwardPartyName;
  546.     StringPtr                       bForwardDN;
  547.     StringPtr                       bForwardSubaddress;
  548.     StringPtr                       bForwardPartyName;
  549.     StringPtr                       naForwardDN;
  550.     StringPtr                       naForwardSubaddress;
  551.     StringPtr                       naForwardPartyName;
  552.     short                           naForwardRings;
  553.     long                            telDNPrivate;
  554.     long                            refCon;
  555.     long                            userData;
  556.     long                            reserved;
  557. };
  558. typedef struct TELDNRecord              TELDNRecord;
  559. typedef TELDNRecord *                   TELDNPtr;
  560. typedef TELDNPtr *                      TELDNHandle;
  561. typedef unsigned long                   TELCAFeatureFlags;
  562. enum {
  563.     holdSub                     = 1L << 0,                      /* hold subscribed  */
  564.     holdAvail                   = 1L << 1,                      /* hold available  */
  565.     holdActive                  = 1L << 2,                      /* hold active  */
  566.     conferenceSub               = 1L << 3,                      /* conference subscribed */
  567.     conferenceAvail             = 1L << 4,                      /* conference available */
  568.     conferenceActive            = 1L << 5,                      /* conference active  */
  569.     conferenceDropSub           = 1L << 6,                      /* conference drop subscribed  */
  570.     conferenceDropAvail         = 1L << 7,                      /* a call to TELDrop will drop this */
  571.                                                                 /* CA only from a conference */
  572.     conferenceSplitSub          = 1L << 8,                      /* conference split subscribed  */
  573.     conferenceSplitAvail        = 1L << 9,                      /* conference split available for this CA */
  574.     numToConferenceRequired     = 1L << 10,                     /* the number of CAs to be conferenced is */
  575.                                                                 /* required in TELConfPrep  */
  576.     transferSub                 = 1L << 11,                     /* transfer subscribed  */
  577.     transferAvail               = 1L << 12,                     /* transfer available  */
  578.     transferActive              = 1L << 13,                     /* transfer active */
  579.     caRelated                   = 1L << 14                      /* this CA is the specified in some other CA's relatedCA field*/
  580. };
  581. typedef unsigned long                   TELCAOtherFeatures;
  582. enum {
  583.     callbackSub                 = 1L << 0,                      /* call back subscribed */
  584.     callbackAvail               = 1L << 1,                      /* call back available */
  585.     callbackActive              = 1L << 2,                      /* call back active  */
  586.     callbackClearSub            = 1L << 3,                      /* call back clearing subscribed */
  587.     callbackNowSub              = 1L << 4,                      /* call back now subscribed */
  588.     callbackNowAvail            = 1L << 5,                      /* call back now available  */
  589.     callbackBusy                = 1L << 6,                      /* call back on busy */
  590.     callbackNoAnswer            = 1L << 7,                      /* call back on no answer */
  591.     callbackReturnsRef          = 1L << 8,                      /* call back returns a reference */
  592.     parkSub                     = 1L << 9,                      /* call park subscribed */
  593.     parkAvail                   = 1L << 10,                     /* call park available */
  594.     parkActive                  = 1L << 11,                     /* call park active */
  595.     parkRetrieveSub             = 1L << 12,                     /* call park retrieve subscribed */
  596.     parkRetrieveWithID          = 1L << 13,                     /* retrieve parked calls with IDs */
  597.     parkWithReturnedID          = 1L << 14,                     /* park call to a specific remote ID */
  598.     parkWithGivenID             = 1L << 18,                     /* for switch that requires ID for parking */
  599.     rejectable                  = 1L << 15,                     /* CA is rejectable  */
  600.     deflectable                 = 1L << 16,                     /* CA is deflectable  */
  601.     acceptable                  = 1L << 17,                     /* CA is acceptable */
  602.     voiceDetected               = 1L << 19,                     /* voice has been detected on this CA incase of */
  603.                                                                 /* an incoming call */
  604.     callAnswdTSRings            = 1L << 20                      /* incoimng call was answered on TollSaver rings */
  605. };
  606. typedef struct TELCARecord              TELCARecord;
  607. typedef TELCARecord *                   TELCAPtr;
  608. typedef TELCAPtr *                      TELCAHandle;
  609. struct TELCARecord {
  610.     short                           caRef;
  611.     TELDNHandle                     hTELDN;
  612.     TELHandle                       hTEL;
  613.     short                           caState;
  614.     TELCAHandle                     relatedCA;
  615.     long                            connectTime;                /* can be used by application to keep track of connect time */
  616.     short                           intExt;
  617.     short                           callType;
  618.     short                           dialType;
  619.     short                           bearerType;
  620.     short                           rate;
  621.     StringPtr                       rmtDN;
  622.     StringPtr                       rmtPartyName;
  623.     StringPtr                       rmtSubaddress;
  624.     StringPtr                       routeDN;
  625.     StringPtr                       routePartyName;
  626.     StringPtr                       routeSubaddress;
  627.     short                           priority;
  628.     short                           conferenceLimit;
  629.     TELCAFeatureFlags               featureFlags;
  630.     TELCAOtherFeatures              otherFeatures;
  631.     long                            telCAPrivate;
  632.     long                            refCon;
  633.     long                            userData;
  634.     long                            reserved;
  635. };
  636. /* Constants for HandleType in structure above */
  637. enum {
  638.     telHandleType               = 0,                            /* feature requires a terminal handle */
  639.     telDNHandleType             = 1,                            /* feature requires a DN handle */
  640.     telCAHandleType             = 2                             /* feature requires a CA handle */
  641. };
  642. struct FeatureList {
  643.     short                           featureID;
  644.     StringPtr                       featureName;
  645.     short                           handleType;
  646.     struct FeatureList *            nextFeature;
  647. };
  648. typedef struct FeatureList              FeatureList;
  649. typedef FeatureList *                   FeatureListPtr;
  650. /* CA MESSAGE STRUCTURES FOR MSGINFO */
  651. struct CAGenericMsgRec {
  652.     StringPtr                       rmtDN;
  653.     StringPtr                       rmtName;
  654.     StringPtr                       rmtSubaddress;
  655.     short                           dialType;
  656. };
  657. typedef struct CAGenericMsgRec          CAGenericMsgRec;
  658. struct CAUserUserInfoMsgRec {
  659.     StringPtr                       userUserInfo;
  660. };
  661. typedef struct CAUserUserInfoMsgRec     CAUserUserInfoMsgRec;
  662. struct CAConfMsgRec {
  663.     TELCAHandle                     relatedCA;
  664. };
  665. typedef struct CAConfMsgRec             CAConfMsgRec;
  666. struct CATransfMsgRec {
  667.     StringPtr                       rmtDN;
  668.     StringPtr                       rmtName;
  669.     StringPtr                       rmtSubaddress;
  670.     short                           dialType;
  671.     TELCAHandle                     prepCA;
  672. };
  673. typedef struct CATransfMsgRec           CATransfMsgRec;
  674. typedef CALLBACK_API( void , TelephoneTermMsgProcPtr )(TELHandle hTEL, long msg, short mtype, short value, long globals);
  675. typedef CALLBACK_API( void , TelephoneDNMsgProcPtr )(TELDNHandle hTELDN, long Msg, short mtype, short value, ConstStr255Param rmtDN, ConstStr255Param rmtName, ConstStr255Param rmtSubaddress, long globals);
  676. typedef CALLBACK_API( void , TelephoneCAMsgProcPtr )(TELCAHandle hTELCA, long Msg, short mtype, short value, Ptr Msginfo, long globals);
  677. typedef CALLBACK_API( void , TelephoneChooseIdleProcPtr )(void );
  678. typedef STACK_UPP_TYPE(TelephoneTermMsgProcPtr)                 TelephoneTermMsgUPP;
  679. typedef STACK_UPP_TYPE(TelephoneDNMsgProcPtr)                   TelephoneDNMsgUPP;
  680. typedef STACK_UPP_TYPE(TelephoneCAMsgProcPtr)                   TelephoneCAMsgUPP;
  681. typedef STACK_UPP_TYPE(TelephoneChooseIdleProcPtr)              TelephoneChooseIdleUPP;
  682. #if OPAQUE_UPP_TYPES
  683. #if CALL_NOT_IN_CARBON
  684.     EXTERN_API(TelephoneTermMsgUPP)
  685.     NewTelephoneTermMsgUPP         (TelephoneTermMsgProcPtr userRoutine);
  686.     EXTERN_API(TelephoneDNMsgUPP)
  687.     NewTelephoneDNMsgUPP           (TelephoneDNMsgProcPtr   userRoutine);
  688.     EXTERN_API(TelephoneCAMsgUPP)
  689.     NewTelephoneCAMsgUPP           (TelephoneCAMsgProcPtr   userRoutine);
  690.     EXTERN_API(TelephoneChooseIdleUPP)
  691.     NewTelephoneChooseIdleUPP      (TelephoneChooseIdleProcPtr userRoutine);
  692.     EXTERN_API(void)
  693.     DisposeTelephoneTermMsgUPP     (TelephoneTermMsgUPP     userUPP);
  694.     EXTERN_API(void)
  695.     DisposeTelephoneDNMsgUPP       (TelephoneDNMsgUPP       userUPP);
  696.     EXTERN_API(void)
  697.     DisposeTelephoneCAMsgUPP       (TelephoneCAMsgUPP       userUPP);
  698.     EXTERN_API(void)
  699.     DisposeTelephoneChooseIdleUPP    (TelephoneChooseIdleUPP userUPP);
  700.     EXTERN_API(void)
  701.     InvokeTelephoneTermMsgUPP      (TELHandle               hTEL,
  702.                                     long                    msg,
  703.                                     short                   mtype,
  704.                                     short                   value,
  705.                                     long                    globals,
  706.                                     TelephoneTermMsgUPP     userUPP);
  707.     EXTERN_API(void)
  708.     InvokeTelephoneDNMsgUPP        (TELDNHandle             hTELDN,
  709.                                     long                    Msg,
  710.                                     short                   mtype,
  711.                                     short                   value,
  712.                                     ConstStr255Param        rmtDN,
  713.                                     ConstStr255Param        rmtName,
  714.                                     ConstStr255Param        rmtSubaddress,
  715.                                     long                    globals,
  716.                                     TelephoneDNMsgUPP       userUPP);
  717.     EXTERN_API(void)
  718.     InvokeTelephoneCAMsgUPP        (TELCAHandle             hTELCA,
  719.                                     long                    Msg,
  720.                                     short                   mtype,
  721.                                     short                   value,
  722.                                     Ptr                     Msginfo,
  723.                                     long                    globals,
  724.                                     TelephoneCAMsgUPP       userUPP);
  725.     EXTERN_API(void)
  726.     InvokeTelephoneChooseIdleUPP    (TelephoneChooseIdleUPP userUPP);
  727. #endif  /* CALL_NOT_IN_CARBON */
  728. #else
  729.     enum { uppTelephoneTermMsgProcInfo = 0x0000EBC0 };              /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes) */
  730.     enum { uppTelephoneDNMsgProcInfo = 0x003FEBC0 };                /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  731.     enum { uppTelephoneCAMsgProcInfo = 0x0003EBC0 };                /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  732.     enum { uppTelephoneChooseIdleProcInfo = 0x00000000 };           /* pascal no_return_value Func() */
  733.     #define NewTelephoneTermMsgUPP(userRoutine)                     (TelephoneTermMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneTermMsgProcInfo, GetCurrentArchitecture())
  734.     #define NewTelephoneDNMsgUPP(userRoutine)                       (TelephoneDNMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneDNMsgProcInfo, GetCurrentArchitecture())
  735.     #define NewTelephoneCAMsgUPP(userRoutine)                       (TelephoneCAMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneCAMsgProcInfo, GetCurrentArchitecture())
  736.     #define NewTelephoneChooseIdleUPP(userRoutine)                  (TelephoneChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneChooseIdleProcInfo, GetCurrentArchitecture())
  737.     #define DisposeTelephoneTermMsgUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  738.     #define DisposeTelephoneDNMsgUPP(userUPP)                       DisposeRoutineDescriptor(userUPP)
  739.     #define DisposeTelephoneCAMsgUPP(userUPP)                       DisposeRoutineDescriptor(userUPP)
  740.     #define DisposeTelephoneChooseIdleUPP(userUPP)                  DisposeRoutineDescriptor(userUPP)
  741.     #define InvokeTelephoneTermMsgUPP(hTEL, msg, mtype, value, globals, userUPP)  CALL_FIVE_PARAMETER_UPP((userUPP), uppTelephoneTermMsgProcInfo, (hTEL), (msg), (mtype), (value), (globals))
  742.     #define InvokeTelephoneDNMsgUPP(hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals, userUPP)  CALL_EIGHT_PARAMETER_UPP((userUPP), uppTelephoneDNMsgProcInfo, (hTELDN), (Msg), (mtype), (value), (rmtDN), (rmtName), (rmtSubaddress), (globals))
  743.     #define InvokeTelephoneCAMsgUPP(hTELCA, Msg, mtype, value, Msginfo, globals, userUPP)  CALL_SIX_PARAMETER_UPP((userUPP), uppTelephoneCAMsgProcInfo, (hTELCA), (Msg), (mtype), (value), (Msginfo), (globals))
  744.     #define InvokeTelephoneChooseIdleUPP(userUPP)                   CALL_ZERO_PARAMETER_UPP((userUPP), uppTelephoneChooseIdleProcInfo)
  745. #endif
  746. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  747. #define NewTelephoneTermMsgProc(userRoutine)                    NewTelephoneTermMsgUPP(userRoutine)
  748. #define NewTelephoneDNMsgProc(userRoutine)                      NewTelephoneDNMsgUPP(userRoutine)
  749. #define NewTelephoneCAMsgProc(userRoutine)                      NewTelephoneCAMsgUPP(userRoutine)
  750. #define NewTelephoneChooseIdleProc(userRoutine)                 NewTelephoneChooseIdleUPP(userRoutine)
  751. #define CallTelephoneTermMsgProc(userRoutine, hTEL, msg, mtype, value, globals) InvokeTelephoneTermMsgUPP(hTEL, msg, mtype, value, globals, userRoutine)
  752. #define CallTelephoneDNMsgProc(userRoutine, hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals) InvokeTelephoneDNMsgUPP(hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals, userRoutine)
  753. #define CallTelephoneCAMsgProc(userRoutine, hTELCA, Msg, mtype, value, Msginfo, globals) InvokeTelephoneCAMsgUPP(hTELCA, Msg, mtype, value, Msginfo, globals, userRoutine)
  754. #define CallTelephoneChooseIdleProc(userRoutine)                InvokeTelephoneChooseIdleUPP(userRoutine)
  755. #endif  /* CALL_NOT_IN_CARBON */
  756. #if CALL_NOT_IN_CARBON
  757. EXTERN_API( TELErr )
  758. InitTEL                         (void);
  759. EXTERN_API( TELErr )
  760. TELGetInfo                      (TELHandle              hTEL);
  761. EXTERN_API( TELErr )
  762. TELOpenTerm                     (TELHandle              hTEL);
  763. EXTERN_API( TELErr )
  764. TELResetTerm                    (TELHandle              hTEL);
  765. EXTERN_API( TELErr )
  766. TELCloseTerm                    (TELHandle              hTEL);
  767. EXTERN_API( TELErr )
  768. TELTermMsgHand                  (TELHandle              hTEL,
  769.                                  long                   eventMask,
  770.                                  TelephoneTermMsgUPP    msgProc,
  771.                                  long                   globals);
  772. EXTERN_API( TELErr )
  773. TELClrTermMsgHand               (TELHandle              hTEL,
  774.                                  TelephoneTermMsgUPP    msgProc);
  775. EXTERN_API( TELErr )
  776. TELTermEventsSupp               (TELHandle              hTEL,
  777.                                  long *                 eventMask);
  778. EXTERN_API( short )
  779. TELGetProcID                    (Str255                 name);
  780. EXTERN_API( TELHandle )
  781. TELNew                          (short                  procID,
  782.                                  TELFlags               flags,
  783.                                  long                   refCon,
  784.                                  long                   userData);
  785. EXTERN_API( TELHandle )
  786. TELNewWithResult                (short                  procID,
  787.                                  TELFlags               flags,
  788.                                  long                   refCon,
  789.                                  long                   userData,
  790.                                  TELErr *               error);
  791. EXTERN_API( TELErr )
  792. TELDefault                      (Ptr *                  theConfig,
  793.                                  short                  procID,
  794.                                  Boolean                allocate);
  795. EXTERN_API( Boolean )
  796. TELValidate                     (TELHandle              hTEL);
  797. EXTERN_API( Ptr )
  798. TELGetConfig                    (TELHandle              hTEL);
  799. EXTERN_API( short )
  800. TELSetConfig                    (TELHandle              hTEL,
  801.                                  Ptr                    thePtr);
  802. EXTERN_API( TELErr )
  803. TELChoose                       (TELHandle *            hTEL,
  804.                                  Point                  where,
  805.                                  TelephoneChooseIdleUPP  idleProc);
  806. EXTERN_API( Handle )
  807. TELSetupPreflight               (short                  procID,
  808.                                  long *                 magicCookie);
  809. EXTERN_API( void )
  810. TELSetupSetup                   (short                  procID,
  811.                                  Ptr                    theConfig,
  812.                                  short                  count,
  813.                                  DialogPtr              theDialog,
  814.                                  long *                 magicCookie);
  815. EXTERN_API( Boolean )
  816. TELSetupFilter                  (short                  procID,
  817.                                  Ptr                    theConfig,
  818.                                  short                  count,
  819.                                  DialogPtr              theDialog,
  820.                                  EventRecord *          theEvent,
  821.                                  short *                theItem,
  822.                                  long *                 magicCookie);
  823. EXTERN_API( void )
  824. TELSetupItem                    (short                  procID,
  825.                                  Ptr                    theConfig,
  826.                                  short                  count,
  827.                                  DialogPtr              theDialog,
  828.                                  short *                theItem,
  829.                                  long *                 magicCookie);
  830. EXTERN_API( void )
  831. TELSetupCleanup                 (short                  procID,
  832.                                  Ptr                    theConfig,
  833.                                  short                  count,
  834.                                  DialogPtr              theDialog,
  835.                                  long *                 magicCookie);
  836. EXTERN_API( void )
  837. TELSetupXCleanup                (short                  procID,
  838.                                  Ptr                    theConfig,
  839.                                  short                  count,
  840.                                  DialogPtr              theDialog,
  841.                                  Boolean                OKed,
  842.                                  long *                 magicCookie);
  843. EXTERN_API( void )
  844. TELSetupPostflight              (short                  procID);
  845. EXTERN_API( TELErr )
  846. TELDispose                      (TELHandle              hTEL);
  847. EXTERN_API( short )
  848. TELCountDNs                     (TELHandle              hTEL,
  849.                                  short                  dnType,
  850.                                  Boolean                physical);
  851. EXTERN_API( TELErr )
  852. TELDNLookupByIndex              (TELHandle              hTEL,
  853.                                  short                  dnType,
  854.                                  Boolean                physical,
  855.                                  short                  index,
  856.                                  TELDNHandle *          hTELDN);
  857. EXTERN_API( TELErr )
  858. TELDNLookupByName               (TELHandle              hTEL,
  859.                                  ConstStr255Param       DN,
  860.                                  TELDNHandle *          hTELDN);
  861. EXTERN_API( TELErr )
  862. TELDNSelect                     (TELDNHandle            hTELDN,
  863.                                  Boolean                select);
  864. EXTERN_API( TELErr )
  865. TELDNDispose                    (TELDNHandle            hTELDN);
  866. EXTERN_API( TELErr )
  867. TELGetDNInfo                    (TELDNHandle            hTELDN);
  868. EXTERN_API( TELErr )
  869. TELGetDNFlags                   (TELDNHandle            hTELDN,
  870.                                  long *                 dnFeatureFlags,
  871.                                  long *                 dnForwardFlags);
  872. EXTERN_API( TELErr )
  873. TELDNMsgHand                    (TELDNHandle            hTELDN,
  874.                                  Boolean                allDNs,
  875.                                  long                   eventMask,
  876.                                  TelephoneDNMsgUPP      msgProc,
  877.                                  long                   globals);
  878. EXTERN_API( TELErr )
  879. TELClrDNMsgHand                 (TELDNHandle            hTELDN,
  880.                                  TelephoneDNMsgUPP      msgProc);
  881. EXTERN_API( TELErr )
  882. TELDNEventsSupp                 (TELDNHandle            hTELDN,
  883.                                  long *                 eventMask);
  884. EXTERN_API( short )
  885. TELCountCAs                     (TELDNHandle            hTELDN,
  886.                                  short                  internalExternal);
  887. EXTERN_API( TELErr )
  888. TELCALookup                     (TELDNHandle            hTELDN,
  889.                                  short                  internalExternal,
  890.                                  short                  index,
  891.                                  TELCAHandle *          hTELCA);
  892. EXTERN_API( TELErr )
  893. TELCADispose                    (TELCAHandle            hTELCA);
  894. EXTERN_API( TELErr )
  895. TELGetCAState                   (TELCAHandle            hTELCA,
  896.                                  short *                state);
  897. EXTERN_API( TELErr )
  898. TELGetCAFlags                   (TELCAHandle            hTELCA,
  899.                                  long *                 caFeatureFlags,
  900.                                  long *                 caOtherFeatures);
  901. EXTERN_API( TELErr )
  902. TELGetCAInfo                    (TELCAHandle            hTELCA);
  903. EXTERN_API( TELErr )
  904. TELCAMsgHand                    (TELDNHandle            hTELDN,
  905.                                  long                   eventMask,
  906.                                  TelephoneCAMsgUPP      msgProc,
  907.                                  long                   globals);
  908. EXTERN_API( TELErr )
  909. TELClrCAMsgHand                 (TELDNHandle            hTELDN,
  910.                                  TelephoneCAMsgUPP      msgProc);
  911. EXTERN_API( TELErr )
  912. TELCAEventsSupp                 (TELDNHandle            hTELDN,
  913.                                  long *                 eventMask);
  914. EXTERN_API( TELErr )
  915. TELSetupCall                    (TELDNHandle            hTELDN,
  916.                                  TELCAHandle *          hTELCA,
  917.                                  ConstStr255Param       destDN,
  918.                                  ConstStr255Param       destName,
  919.                                  ConstStr255Param       destSubaddress,
  920.                                  ConstStr255Param       userUserInfo,
  921.                                  short                  bearerType,
  922.                                  short                  rate);
  923. EXTERN_API( TELErr )
  924. TELConnect                      (TELCAHandle            hTELCA);
  925. EXTERN_API( TELErr )
  926. TELDialDigits                   (TELCAHandle            hTELCA,
  927.                                  ConstStr255Param       digits);
  928. EXTERN_API( TELErr )
  929. TELAcceptCall                   (TELCAHandle            hTELCA);
  930. EXTERN_API( TELErr )
  931. TELRejectCall                   (TELCAHandle            hTELCA,
  932.                                  short                  reason);
  933. EXTERN_API( TELErr )
  934. TELDeflectCall                  (TELCAHandle            hTELCA,
  935.                                  ConstStr255Param       rmtDN,
  936.                                  ConstStr255Param       rmtName,
  937.                                  ConstStr255Param       rmtSubaddress);
  938. EXTERN_API( TELErr )
  939. TELAnswerCall                   (TELCAHandle            hTELCA);
  940. EXTERN_API( TELErr )
  941. TELDrop                         (TELCAHandle            hTELCA,
  942.                                  ConstStr255Param       userUserInfo);
  943. EXTERN_API( TELErr )
  944. TELHold                         (TELCAHandle            hTELCA);
  945. EXTERN_API( TELErr )
  946. TELRetrieve                     (TELCAHandle            hTELCA);
  947. EXTERN_API( TELErr )
  948. TELConferencePrep               (TELCAHandle            hTELCA1,
  949.                                  TELCAHandle            hTELCA2,
  950.                                  short                  numToConference);
  951. EXTERN_API( TELErr )
  952. TELConferenceEstablish          (TELCAHandle            hTELCA1,
  953.                                  TELCAHandle            hTELCA2);
  954. EXTERN_API( TELErr )
  955. TELConferenceSplit              (TELCAHandle            hTELCA);
  956. EXTERN_API( TELErr )
  957. TELTransferPrep                 (TELCAHandle            hTELCA1,
  958.                                  TELCAHandle            hTELCA2);
  959. EXTERN_API( TELErr )
  960. TELTransferEstablish            (TELCAHandle            hTELCA1,
  961.                                  TELCAHandle            hTELCA2);
  962. EXTERN_API( TELErr )
  963. TELTransferBlind                (TELCAHandle            hTELCA,
  964.                                  ConstStr255Param       rmtDN,
  965.                                  ConstStr255Param       rmtName,
  966.                                  ConstStr255Param       rmtSubaddress);
  967. EXTERN_API( TELErr )
  968. TELForwardSet                   (TELDNHandle            hTELDN,
  969.                                  ConstStr255Param       forwardDN,
  970.                                  ConstStr255Param       forwardName,
  971.                                  ConstStr255Param       forwardSubaddress,
  972.                                  short                  forwardType,
  973.                                  short                  numrings);
  974. EXTERN_API( TELErr )
  975. TELForwardClear                 (TELDNHandle            hTELDN,
  976.                                  short                  forwardType);
  977. EXTERN_API( TELErr )
  978. TELCallbackSet                  (TELCAHandle            hTELCA,
  979.                                  short *                callbackRef);
  980. EXTERN_API( TELErr )
  981. TELCallbackClear                (TELHandle              hTEL,
  982.                                  short                  callbackRef);
  983. EXTERN_API( TELErr )
  984. TELCallbackNow                  (TELCAHandle            hTELCA,
  985.                                  short                  callbackRef);
  986. EXTERN_API( TELErr )
  987. TELDNDSet                       (TELDNHandle            hTELDN,
  988.                                  short                  dndType);
  989. EXTERN_API( TELErr )
  990. TELDNDClear                     (TELDNHandle            hTELDN,
  991.                                  short                  dndType);
  992. EXTERN_API( TELErr )
  993. TELCallPickup                   (TELCAHandle            hTELCA,
  994.                                  ConstStr255Param       pickupDN,
  995.                                  short                  pickupGroupID);
  996. EXTERN_API( TELErr )
  997. TELParkCall                     (TELCAHandle            hTELCA,
  998.                                  StringPtr *            parkRetrieveID,
  999.                                  ConstStr255Param       parkID);
  1000. EXTERN_API( TELErr )
  1001. TELRetrieveParkedCall           (TELCAHandle            hTELCA,
  1002.                                  ConstStr255Param       parkRetrieveID);
  1003. EXTERN_API( TELErr )
  1004. TELVoiceMailAccess              (TELCAHandle            hTELCA);
  1005. EXTERN_API( TELErr )
  1006. TELPaging                       (TELCAHandle            hTELCA,
  1007.                                  short                  pageID);
  1008. EXTERN_API( TELErr )
  1009. TELIntercom                     (TELCAHandle            hTELCA,
  1010.                                  short                  intercomID);
  1011. EXTERN_API( TELErr )
  1012. TELOtherFeatureList             (TELHandle              hTEL,
  1013.                                  FeatureListPtr *       fList);
  1014. EXTERN_API( TELErr )
  1015. TELOtherFeatureImplement        (TELHandle              hTEL,
  1016.                                  Handle                 theHandle,
  1017.                                  short                  featureID);
  1018. EXTERN_API( TELErr )
  1019. TELToolFunctions                (TELHandle              hTEL,
  1020.                                  short                  msgcode,
  1021.                                  Boolean *              supportsIt);
  1022. EXTERN_API( TELErr )
  1023. TELOtherFunction                (TELHandle              hTEL,
  1024.                                  Ptr                    paramblock,
  1025.                                  long                   size);
  1026. EXTERN_API( TELErr )
  1027. TELGetHooksw                    (TELHandle              hTEL,
  1028.                                  short                  hookType,
  1029.                                  Boolean *              offHook);
  1030. EXTERN_API( TELErr )
  1031. TELSetHooksw                    (TELHandle              hTEL,
  1032.                                  short                  hookType,
  1033.                                  Boolean                offHook);
  1034. EXTERN_API( TELErr )
  1035. TELGetVolume                    (TELHandle              hTEL,
  1036.                                  short                  volType,
  1037.                                  short *                level,
  1038.                                  short *                volState);
  1039. EXTERN_API( TELErr )
  1040. TELSetVolume                    (TELHandle              hTEL,
  1041.                                  short                  volType,
  1042.                                  short *                level,
  1043.                                  short                  volState);
  1044. EXTERN_API( TELErr )
  1045. TELAlert                        (TELHandle              hTEL,
  1046.                                  short *                level,
  1047.                                  short                  alertPattern);
  1048. EXTERN_API( TELErr )
  1049. TELGetDisplay                   (TELHandle              hTEL,
  1050.                                  short                  index,
  1051.                                  short *                displayMode,
  1052.                                  StringPtr *            text);
  1053. EXTERN_API( TELErr )
  1054. TELSetDisplay                   (TELHandle              hTEL,
  1055.                                  short                  index,
  1056.                                  short                  displayMode,
  1057.                                  ConstStr255Param       text);
  1058. EXTERN_API( void )
  1059. TELIdle                         (TELHandle              hTEL);
  1060. EXTERN_API( void )
  1061. TELActivate                     (TELHandle              hTEL,
  1062.                                  Boolean                activate);
  1063. EXTERN_API( void )
  1064. TELResume                       (TELHandle              hTEL,
  1065.                                  Boolean                resume);
  1066. EXTERN_API( Boolean )
  1067. TELMenu                         (TELHandle              hTEL,
  1068.                                  short                  menuID,
  1069.                                  short                  item);
  1070. EXTERN_API( void )
  1071. TELEvent                        (TELHandle              hTEL,
  1072.                                  const EventRecord *    theEvent);
  1073. EXTERN_API( void )
  1074. TELGetToolName                  (short                  procID,
  1075.                                  Str255                 name);
  1076. EXTERN_API( Handle )
  1077. TELGetVersion                   (TELHandle              hTEL);
  1078. EXTERN_API( short )
  1079. TELGetTELVersion                (void);
  1080. EXTERN_API( TELErr )
  1081. TELIntlToEnglish                (TELHandle              hTEL,
  1082.                                  Ptr                    inputPtr,
  1083.                                  Ptr *                  outputPtr,
  1084.                                  short                  language);
  1085. EXTERN_API( TELErr )
  1086. TELEnglishToIntl                (TELHandle              hTEL,
  1087.                                  Ptr                    inputPtr,
  1088.                                  Ptr *                  outputPtr,
  1089.                                  short                  language);
  1090. EXTERN_API( TELErr )
  1091. TELGetDNSoundInput              (TELDNHandle            hTELDN,
  1092.                                  Str255                 deviceName);
  1093. EXTERN_API( TELErr )
  1094. TELDisposeDNSoundInput          (TELDNHandle            hTELDN,
  1095.                                  ConstStr255Param       deviceName);
  1096. EXTERN_API( TELErr )
  1097. TELGetDNSoundOutput             (TELDNHandle            hTELDN,
  1098.                                  Component *            SndOut);
  1099. EXTERN_API( TELErr )
  1100. TELDisposeDNSoundOutput         (TELDNHandle            hTELDN,
  1101.                                  Component              SndOut);
  1102. EXTERN_API( TELErr )
  1103. TELGetHSSoundInput              (TELHandle              termHand,
  1104.                                  Str255                 deviceName);
  1105. EXTERN_API( TELErr )
  1106. TELDisposeHSSoundInput          (TELHandle              termHand,
  1107.                                  ConstStr255Param       deviceName);
  1108. EXTERN_API( TELErr )
  1109. TELGetHSSoundOutput             (TELHandle              termHand,
  1110.                                  Component *            SndOut);
  1111. EXTERN_API( TELErr )
  1112. TELDisposeHSSoundOutput         (TELHandle              termHand,
  1113.                                  Component              SndOut);
  1114. EXTERN_API( TELErr )
  1115. TELDNSetAutoAnswer              (TELDNHandle            hTELDN,
  1116.                                  Boolean                AutoAnswerOn);
  1117. EXTERN_API( TELErr )
  1118. TELDNTollSaverControl           (TELDNHandle            hTELDN,
  1119.                                  Boolean                QuickAnswer);
  1120. EXTERN_API( TELErr )
  1121. TELSetIndHSConnect              (TELHandle              termHand,
  1122.                                  Boolean                Connect);
  1123. EXTERN_API( TELErr )
  1124. TELGetIndHSConnect              (TELHandle              termHand,
  1125.                                  Boolean *              Connect);
  1126. EXTERN_API( TELErr )
  1127. TELCAVoiceDetect                (TELCAHandle            hTELCA,
  1128.                                  Boolean                VoiceDetectOn);
  1129. EXTERN_API( TELErr )
  1130. TELCASilenceDetect              (TELCAHandle            hTELCA,
  1131.                                  Boolean                DetectOn,
  1132.                                  long                   Period);
  1133. EXTERN_API( TELErr )
  1134. TELGetTelNewErr                 (void);
  1135. EXTERN_API( TELErr )
  1136. TELDNSetDTMF                    (TELDNHandle            hTELDN,
  1137.                                  Boolean                dtmfOn);
  1138. EXTERN_API( TELErr )
  1139. TELDNGetDTMF                    (TELDNHandle            hTELDN,
  1140.                                  Boolean *              dtmfOn);
  1141. EXTERN_API( TELErr )
  1142. TELHSSetDTMF                    (TELHandle              termHand,
  1143.                                  Boolean                dtmfOn);
  1144. EXTERN_API( TELErr )
  1145. TELHSGetDTMF                    (TELHandle              termHand,
  1146.                                  Boolean *              dtmfOn);
  1147. EXTERN_API( TELErr )
  1148. TELGetDNStatus                  (TELDNHandle            hTELDN,
  1149.                                  long *                 inUse);
  1150. EXTERN_API( TELErr )
  1151. TELGetDNProgressDet             (TELDNHandle            hTELDN,
  1152.                                  long                   selector,
  1153.                                  Boolean *              prgDetOn);
  1154. EXTERN_API( TELErr )
  1155. TELSetDNProgressDet             (TELDNHandle            hTELDN,
  1156.                                  long                   selector,
  1157.                                  Boolean                prgDetOn);
  1158. #endif  /* CALL_NOT_IN_CARBON */
  1159. #if PRAGMA_STRUCT_ALIGN
  1160.     #pragma options align=reset
  1161. #elif PRAGMA_STRUCT_PACKPUSH
  1162.     #pragma pack(pop)
  1163. #elif PRAGMA_STRUCT_PACK
  1164.     #pragma pack()
  1165. #endif
  1166. #ifdef PRAGMA_IMPORT_OFF
  1167. #pragma import off
  1168. #elif PRAGMA_IMPORT
  1169. #pragma import reset
  1170. #endif
  1171. #ifdef __cplusplus
  1172. }
  1173. #endif
  1174. #endif /* __TELEPHONES__ */