
Err = OTAsyncOpenEndpoint( OTCreateConfiguration("Script"), .....)OT_CONNECT will initialize
the connection, disconnect etc. In fact, you should be able to pass in
the phone number from the Connect in the addr field.
Since there is no OpenTransportModem.h file available, you will need some
of the following information:
// The Configuration name for the Opentransport Modem/Script engine
#define kScriptName "Script"
// To check if the Modem/Script engine is installed you should interrogate
// the proper Gestalt Selectors for Open Transport-based Modem libraries.
#define gestaltOpenTptModem 'otmo'
#define gestaltOpenTptModemPresent 0
#define gestaltOpenTptModemVersion 'otmv'
#define kGestaltOpenTptModemVersion 0x01000080
// Note: possible values for the "stage" byte are:
// development = 0x20, alpha = 0x40, beta = 0x60, final & release = 0x80
// These are the Modem/Script Configurator error codes. Other codes may be
// returned from Open Transport and operating system routines.
#define kModemNoError 0
#define kModemOutOfMemory -14000
#define kModemPreferencesMissing -14001
#define kModemScriptMissing -14002
Since you either have to set the modem type manually through the Modems
Control panel, or hack the Modem Configuration pref file yourself (all
warnings// apply) it might be helpful to know a few things about the Modem
preference file.// The Modem Configuration pref resource file constants.
kModemConfigFileCreator = 'modm',
kModemConfigFileType = 'mdpf',
kModemConfigVersion = 0x00010000,
kModemConfigExportType = 'mdex',
kModemScriptType = 'mlts', // Same as ARA 1.0/2.0
kModemScriptCreator = 'slnk', // Same as ARA 1.0/2.0
// Configuration resource constants.
kModemConfigTypeModem = 'ccl ', // Type for Modem config resource
kModemSelectedConfigID = 1, // ID of resource containing..
kModemSelectedConfigType = 'ccfg', // the ID of current selected CCL
kModemConfigNameType = 'cnam', // type of config name rez
kModemConfigTypeLocks = 'lkmd', // Types for lock rez
kModemConfigFirstID = 128 // lowest id for configuration rez
// Maximum script file name size. Same as "name" field of FSSpec kMaxScriptNameSize = 64
// File name to use only if the internationalized one can't be read
// from the resource fork.
#define kDefaultModemPrefsFileName "\pModem Preferences"
// Dial tone modes
enum
{
kDialToneNormal = 0,
kDialToneIgnore = 1,
kDialToneManual = 2
};
// Modem Configuration
// Resource format for Modem configuration info.
typedef struct
{
UInt32 version;
Boolean useModemScript;
FSSpec modemScript;
Boolean modemSpeakerOn;
Boolean modemPulseDial;
UInt32 modemDialToneMode;
SInt8 lowerLayerName[kMaxProviderNameSize];
} RAConfigModem;
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help