•About the Macintosh Connectivity Classes AppleScript SDK January 22, 1999 The Connectivity Suite is a set of utility classes for describing physical and logical devices and connections to Macintosh computers. It is provided to the Macintosh community as a way to standardize the descriptions of devices and connections in scriptable applications. Its first use is in the Desktop Printing and Network Setup Scripting features in Mac OS 8.5; in the future, other Apple scriptable software will use the classes in the Connectivity Suite to describe devices and connections. The principal advantage of using the Connectivity Suite to describe devices and connections is to allow the scripter to use the results from one scriptable application in another. For example, a browser program that finds printers on an Intranet or Internet could return the correct connection class that could be passed to Desktop Printing to create a desktop printer for that class. Location and Use of the Connectivity Classes The Connectivity Suite is included in the AppleScript English Dialect Œaeut¹ resource, so it is available to all scriptable applications. Additionally, it is published in the form of a Rez file (included in this SDK) for subsetting in your own applications. Although it is present in the Œaeut¹ resource, the Connectivity Suite terms are not automatically loaded into systemwide terminology by AppleScript (as are the AppleScript terms). Applications can use the Connectivity Suite in its entirety by the auto-inclusion mechanism (see ³Supporting Standard Suites Without Extensions² in Inside Macintosh Interapplication Communications, chapter 8; ). This should only be done for applications with broad and general support of devices and connections, for example, configuration analyzers. If you auto-include the entire suite in order to support a small number of devices and protocols, your terminology will consist mostly of unsupported classes and be confusing to the scripter. The recommended method of use for the Connectivity Suite is to excerpt only the classes your application will use, and perhaps extend those classes with additional information specific to your application, as described in Inside Macintosh Interapplication Communications, chapter 8; see . You can browse the Connectivity Suite in its entirety in the Mac OS 8.5 Registry database, included in this SDK. Connectivity Suite Classes The Connectivity Suite consists of three major parts: € The device specification and address specification superclasses € Ten device specificaion or address specification classes that describe specific devices or addressing forms € Three enumerations that provide values for properties in device or address specifications You will rarely create objects of the device specification and address specification classes directly; most scriptable objects will be members of the specific device or address classes. Objects in each class generally have no contents other than the collected value of their properties. In responding to the ³get data² event for a Connectivity Suite class, you may return either an object specifier that your application will resolve later, or a coerced record of the correct class containing all the object¹s properties as record elements. (Note: if you do the latter, omit the ³properties² property, as it will be redundant and the nesting will need to be special-cased). Suite kConnSuite Macintosh Connectivity Classes code: Œmacc¹ ___________________________________________________________ The suite code for the Connectivity Classes. If you subset the classes, use ŒMaCc¹ or the like. Use of kConnSuite in your terminology will result in auto-inclusion of all the below classes. Classes cDevSpec device specification (plural: device specifications) code: Œcdev¹ ___________________________________________________________ The generic class for a device specification, used to designate a peripheral device built into or attached to a Macintosh personal computer. The Connectivity Classes do not provide classes for common devices, but each device class created by your application should inherit from this class. Properties pProperties properties type: Œreco¹ code: ŒpALL¹ All other properties of this class as a record. Omit this class if you return a coerced record in response to a Get Data event. pDeviceType device type type: Œedvt¹ code: Œpdvt¹ An enumerated value designating the type of device that this object specifies. pDeviceAddress device address type: Œcadr¹ code: Œpdva¹ An object of any subclass of cAddressSpec that specifies how the device is most directly connected to the Macintosh Notes In advanced applications the implemetation of device specification classes can be significantly enhanced to provide more information to the scripter. The implementor could include address specification or device specification elements, to handle cases where the device specified (i.e. a modem or network interface card) provided downstream connections to other devices. This would allow the scripter to express relationships such as every printer of print server "Morpheus" of AppleTalk connection of modem 4. cAddressSpec address specification (plural: address specifications) code: Œcadr¹ ___________________________________________________________ The generic class for an address specification, used to designate the manner in which a device is attached to a Macintosh personal computer, both physically and logically. The Connectivity Classes provide several subclasses for common addressing mechanisms; you may add additional subclasses for new addressing mechanisms that inherit from this class, or extend the properties of the classes provided. This class does not define any properties that would be useful as key forms for inclusion of the address specification as an element of another class, but most subclasses provide either an ID or name class that would be useful as a key form. Properties pProperties properties type: Œreco¹ code: ŒpALL¹ All other properties of this class as a record. Omit this class if you return a coerced record in response to a Get Data event. pConduit conduit type: Œecon¹ code: Œpcon¹ An enumerated value that denotes the physical connection of this addressing mechanism. pProtocol protocol type: Œepro¹ code: Œpprt¹ An enumerated value that denotes the logical or data format of this addressing mechanism. Notes In advanced applications the implemetation of address specification classes can be significantly enhanced to provide more information to the scripter. For example, an address specification class could include a pUpstreamDevice property that would specify the means by which the addressing mechanism is implemented in the Macintosh, i.e. modem cards in bus slots or PC cards. cADBAddress ADB address (plural: ADB addresses) code: Œcadb¹ ___________________________________________________________ Addressing via the Apple Desktop Bus. Properties pID ID type: Œshor¹ code: ŒID ¹ Corresponds to the origADBAddr field of the ADBDataBlock structure of an Apple Desktop Bus device request. This number is normally between 0 and 15. cAppleTalkAddress AppleTalk address (plural: AppleTalk addresses) code: Œcat ¹ ___________________________________________________________ Addressing via the AppleTalk Name Binding Protocol (NBP). Properties pATMachine AppleTalk machine type: ŒTEXT¹ code: Œpatm¹ Corresponds to the objStr field of the EntityName structure for the AppleTalk Name Binding Protocol. Note that objStr is normally a 32-bit string preceded by a length byte; use the typePString <‹> typeChar coercions to convert. pATZone AppleTalk zone type: ŒTEXT¹ code: Œpatz¹ Corresponds to the typeStr field of the EntityName structure for the AppleTalk Name Binding Protocol. Note that typeStr is normally a 32-bit string preceded by a length byte; use the typePString <‹> typeChar coercions to convert. pATType AppleTalk type type: ŒTEXT¹ code: Œpatt¹ Corresponds to the zoneStr field of the EntityName structure for the AppleTalk Name Binding Protocol. Note that zoneStr is normally a 32-bit string preceded by a length byte; use the typePString <‹> typeChar coercions to convert. cBusAddress bus slot (plural: bus slots) code: Œcbus¹ ___________________________________________________________ A slot number in a NuBus, PCMCIA, or PCI multislot bus. Properties pID ID type: Œshor¹ code: ŒID ¹ Corresponds to the spSlot field of the SpBlock Slot Manager parameter block data structure (for NuBus), the AAPL,slot-name property registered with the Name Manager for a slot in a PCI bus, or the socket value from the GetModRequestConfigInfoPB data structure for PCMCIA cards (³PC cards²). Note in the case of Type III PC cards, a card may physically occupy two slots, but only make electrical contact in the lower one; it is this socket number which is assigned by Card Services. cEthernetAddress Ethernet address (plural: Ethernet addresses) code: Œcen ¹ ___________________________________________________________ An address on an IEEE 802.3 network. Note that this is a raw Ethernet device address, not an Internet Protocol (IP) address. Properties pID ID type: Œneta¹ code: ŒID ¹ The unique Ethernet address, as a six-byte value. Note In the Œaeut¹ resource in Mac OS 8.5, the type of the pID property is listed as Œlong¹, which is too small to hold an Ethernet address. If you use Ethernet or Token Ring addressing classes, do not auto-include the Macintosh Connectivity Classes, but use your own correct classes instead. cFireWireAddress FireWire address (plural: FireWire addresses) code: Œcfw ¹ ___________________________________________________________ An address on an IEEE 1394 communications bus. Properties pID ID type: Œshor¹ code: ŒID ¹ The unique ID of a FireWire device, from the Bus Topology Services of the FireWire Services manager. cIPAddress IP address (plural: IP addresses) code: Œcip ¹ ___________________________________________________________ An address using the Internet Protocol version 4 (IPv4) specification. Properties pID ID type: ŒTEXT¹ code: ŒID ¹ The IP address as a dotted-decimal string, e.g. ³127.0.0.1². pDNS DNS form type: ŒTEXT¹ code: Œpdns¹ The IP address in Domain Name Specification form, e.g. ³www.apple.com². Note that this is a host IP address, not an HTTP URL or URI. pPort port type: ŒTEXT¹ code: Œppor¹ The Internet Protocol port number of the IP connection as a string, e.g. ³80². Notes Note that the ID and Port values are in string form, as they would normally be entered by a user or scripter, not in the binary or decimal forms that would be used by the Open Transport interface. The DNS form, as it can be expensive to obtain, may be omitted. The port number may be omitted, in which case the default port number for the service being requested should be used. cLocalTalkAddress LocalTalk address (plural: LocalTalk addresses) code: Œclt ¹ ___________________________________________________________ The address of a LocalTalk device on a LocalTalk network. Properties pNetwork network type: Œshor¹ code: Œpnet¹ Corresponds to the aNet field of the AddrBlock data structure for the AppleTalk DDP protocol. pNode node type: Œshor¹ code: Œpnod¹ Corresponds to the aNode field of the AddrBlock data structure for the AppleTalk DDP protocol. pSocket socket type: Œshor¹ code: Œpsoc¹ Corresponds to the aSocket field of the AddrBlock data structure for the AppleTalk DDP protocol. cSCSIAddress SCSI address (plural: SCSI addresses) code: Œcscs¹ ___________________________________________________________ The address of a device on a Small Computer Systems Interface (ANSI X3.131-1986) bus. Properties pSCSIBus SCSI bus type: Œshor¹ code: Œpscb¹ The bus number, usually 0 or 1, from the bus field of the DeviceIdent data structure. pID ID type: Œshor¹ code: ŒID ¹ The unique SCSI ID of the device, usually a number from 0 to 7, from the targetID field of the DeviceIdent data structure. pSCSILUN LUN type: Œshor¹ code: Œpslu¹ The logical unit number of the SCSI device, from the LUN field of the DeviceIdent data structure. cTokenRingAddress Token Ring address (plural: Token Ring addresses) code: Œctok¹ ___________________________________________________________ The address of a device on a Token Ring (IEEE 802.2) network. Properties pID ID type: Œneta¹ code: ŒID ¹ The unique Token Ring address, as a six-byte value. Note In the Œaeut¹ resource in Mac OS 8.5, the type of the pID property is listed as Œshor¹, which is too small to hold a Token Ring address. If you use Ethernet or Token Ring addressing classes, do not auto-include the Macintosh Connectivity Classes, but use your own correct classes instead. cUSBAddress USB address (plural: USB Addresses) code: Œcusb¹ ___________________________________________________________ A device on the Universal Serial Bus. Properties pID ID type: long code: ŒID ¹ The USB device referencence for this device, USBDeviceRef, from any USB call. keyAEName name type: ŒTEXT¹ code: Œpnam¹ A user-visible name for this device, extracted from the device itself. Note In the Œaeut¹ resource in Mac OS 8.5, the pID property is omitted. Note also that the name property is optional and may not be supplied by all USB devices. Enumerations eDeviceType code: Œedvt¹ This enumeration comprises enumerators for common and generic devices. In your implementation you may subset or extend this enumeration with your own enumerators; for an example, see the Desktop Printing Manager dictionary. eHD hard disk drive code: Œehd ¹ A large, fast, usually read/write storage device with fixed media and one or more file system volumes. eFloppy floppy disk drive code: Œefd ¹ A smaller, slower disk drive with lockable, removeable media with one file system volume. eCDROM CD ROM drive code: Œecd ¹ A large, usually read-only storage device with removeable media and one or more file system volumes. eDVD DVD drive code: Œedvd¹ A very large read-only storage device with removeable media and one or more file system volumes. eStorageDevice storage device code: Œedst¹ A storage device other that the above; this covers CD-R and DVD-R drives, flash cards, tape drives, removeable hard drives, etc.. eKeyboard keyboard code: Œekbd¹ An alphanumeric keyboard. eMouse mouse code: Œemou¹ A rolling point device with one or more buttons. eTrackball trackball code: Œetrk¹ A fixed pointing device with a rolling ball and one or more buttons. eTrackpad trackpad code: Œedtp¹ A pointing device with a touch-sensitive pad and one or more buttons. ePointingDevice pointing device code: Œedpd¹ A pointing device other than the above; this covers touch screens, graphics tablets, and joysticks. eVideoMonitor video monitor code: Œedvm¹ A visual display for bitmapped computer graphics, usually on a CRT. eLCD LCD display code: Œedlc¹ A visual display for bitmapped computer graphics on a fixed-resolution flat-panel display. eDisplay display code: Œedds¹ A visual display for bitmapped computer graphics of some other kind. eModem modem code: Œedmm¹ A modulator/demodulator, usually driven by a serial protocol and connected to telephone lines. ePCcard PC card code: Œecpc¹ A card in a slot in a PCMCIA adapter. ePCIcard PCI card code: Œedpi¹ An interface card in a PCI slot on the Macintosh motherboard. eNuBusCard NuBus card code: Œednb¹ An interface card in a NuBus slot on the Macintosh motherboard. ePrinter printer code: Œedpr¹ A hardcopy output device addressed by a printer driver. eSpeakers speakers code: Œedsp¹ One or more analog audio output devices. eMicrophone microphone code: Œecmi¹ An analog audio input device. eConduit code: Œecon¹ This enumeration comprises enumerators for common and generic communications means. In your implementation you may subset or extend this enumeration with your own enumerators. eADB ADB code: Œeadb¹ The Apple Desktop Bus. Multiple ADB ports are indistinguishable from one another. ePrinterPort printer port code: Œecpp¹ The RS-422 serial port driven by the .ain/.aout device drivers. eModemPort modem port code: Œecmp¹ The RS-422 serial port driven by the .bin/.bout device drivers, or the internal modem port on a PowerBook. eModemPrinterPort modem printer port code: Œempp¹ The RS-422 serial port driven by the .ain/.aout device driver on a PowerBook. eLocalTalk LocalTalk code: Œeclt¹ A RS-422 serial port configured for the LocalTalk LAP layer. eEthernet Ethernet code: Œecen¹ An Ethernet port, either 10Mbps or 100Mbps, using RJ15, thin coax, or thick coax cable, on the main logic board, a NuBus, PC, PCI, PDS, or Comm Slot I or II card. eTokenRing Token Ring code: Œetok¹ A Token Ring port on a Token Ring interface card. eSCSI SCSI code: Œecsc¹ The Small Computer Systems Interface bus, either on the main logic board or an interface card. eUSB USB code: Œecus¹ The Universal Serial Bus port, either on the main logic board or on an interface card. Note that multiple USB ports are indistinguishable from one another. eFireWire FireWire code: Œecfw¹ The FireWire port, either on the main logic board or on an interface card. eInfrared infrared code: Œecir¹ The built-in infrared port on a Powerbook or iMac. ePCcard PC card code: Œecpc¹ A PCMCIA adapter. ePCIbus PCI bus code: Œecpi¹ The PCI bus slots on Power Macintosh models after 1994. eNuBus NuBus code: Œenub¹ The NuBus bus slots on Macintosh models between the Macintosh II (1997) and the Power Macintosh models through 1994. ePDSslot PDS slot code: Œecpd¹ A processor-direct slot on the main logic board of a Maicntosh SE, Classic, Performa, etc. eCommSlot Comm slot code: Œeccm¹ The Comm Slot I or II. eMonitorOut monitor out code: Œecmn¹ The output connector for bitmapped computer graphics, either on the main logic board or on a video interface card. eVideoOut video out code: Œecvo¹ A line (NTSC, PAL, SECAM) or component video, S-video, or RGB video output for video signals from AV circuitry. eVideoIn video in code: Œecvi¹ The input port for line (NTSC, PAL, SECAM) or component video, S video, or RGB video input for capture or overlay. eAudioOut audio out code: Œecao¹ Line-level audio output from the Macintosh sound circuitry. eAudioLineIn audio line in code: Œecai¹ Line-level audio input for digitization or redirection to line out or speakers. eAudioLineOut audio line out code: Œecal¹ Line-level audio output from the TV or FM tuner, CD or DVD ROM drives, or AV card, possibly mixed with audio output from the Macintosh sound circuitry. eMicrophone microphone code: Œecmi¹ Low-level audio input from the Macintosh built-in microphone or Microphone or PlainTalk Microphone jack. eProtocol code: Œepro¹ This enumeration comprises enumerators for communications protocols between the Macintosh and various devices over the communications conduits enumerated above. In your implementation you may subset or extend this enumeration with your own protocol values. eSerial serial code: Œepsr¹ RS-422 bidirectional serial communications. eAppleTalk AppleTalk code: Œepat¹ The AppleTalk Transaction Protocol and related protocols. eIP IP code: Œepip¹ Internet Protocol v4 and related protocols. eSCSI SCSI code: Œecsc¹ The Small Computer Systems Interface and SCSI-2 protocols. eADB ADB code: Œeadb¹ The Apple Desktop Bus protocol. eFireWire FireWire code: Œecfw¹ The IEEE 1394 protocols. eIrDA IrDA code: Œepir¹ The Infrared Data Assocation IrLMP protocol. eIRTalk IRTalk code: Œepit¹ AppleTalk protocols over an infrared link. eUSB USB code: Œecus¹ The Universal Serial Bus protocols. ePCcard PC card code: Œecpc¹ The PCMCIA card protocols. ePCIbus PCI bus code: Œecpi¹ The Peripheral Connect Interface protocols. eNuBus NuBus code: Œenub¹ The NuBus protocols. eBus bus code: Œebus¹ Other bus protocols. eMacVideo Macintosh video code: Œepmv¹ Bitmapped video, nominally 72dpi, square pixels, with bit depths per pixel from 1 to 32 bits. eSVGA SVGA code: Œepsg¹ The Super VGA video standard. eSvideo S video code: Œepsv¹ The Sony S-video protocols. eAnalogAudio analog audio code: Œepau¹ Monophonic or stereo analog audio. eDigitalAudio digital audio code: Œepda¹ An unspecified digital audio protocol. ePostScript PostScript code: Œepps¹ Adobe PostScript level 1, 2, or 3. ________________________________ © 1998 Apple Computer. Inc. All rights reserved. Apple, the Apple logo, LaserWriter, MacTCP, Power Macintosh, Mac, and Macintosh are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. All other product names are trademarks or registered trademarks of their respective holders. Mention of non-Apple products is for information purposes and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance, or use of these products. Updated January 22, 1999 v 1.0