home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
phonekit
/
NXPhone.h
next >
Wrap
Text File
|
1992-07-08
|
3KB
|
94 lines
/*
* ISDN/POTS Project
* Copyright 1991, NeXT, Inc.
*
* NXPhone.h
*
* Interactions with the POTS/ISDN server are handled by
* three object classes, the NXPhone object, NXPhoneChannel objects
* and NXPhoneCall objects.
*
* All communication between the server and application is handled via
* remote objects, so a simple objective-C API is presented. Applications
* must subclass the NXPhoneCall object to receive messages from the
* server.
*
* The NXPhone object is repsonsible for establishing a connection to
* the POTS/ISDN server and for maintaining a list of channels objects.
*
* The NXPhoneChannel object roughly corresponds to an ISDN B channel, or
* a POTS connection. It maintains a list of call objects that actually
* receive and can send signalling information to the phone server.
*
* An NXPhoneCall object gives access to call control functions and
* gives access to a data reception and transmission on a device.
* To establish a connection you must create phone object and create
* at least one data or voice channel.
*
* Only one NXPhone object is required to control all data and
* voice channels.
*
* There is a rough analogy between the NXPhonePhone, NXPhoneChannel,
* NXPhoneCall hierarchy and the Application, Window, View hierarchy
* in the appkit.
*/
#import <mach/port.h>
#import <objc/Object.h>
#import "phoneTypes.h"
@interface NXPhone : Object
{
void *_private;
port_t local_port; // This instance variable will be removed.
}
/*
* Create a connection to the phone server.
* The -active method should be used to determine if the
* connection to the phone server was successful.
*/
- init;
- initType: (NXPhoneDeviceType)device_type;
- initDevice: (NXPhoneDeviceType)device_type; // Obsolete will be removed
// Use initType:
- run;
- runFromAppKit;
/*
* -isActive returns nil if the Phone object can not connect
* to the PhoneServer.
*/
- (BOOL)isActive;
/*
* Use DSPAddPort() if -runFromAppkit is toEused.
*/
- addPort: (port_t)port receiver: t method: (SEL)sel;
// To be removed. These methods are obsolete.
- addPort: (port_t) port;
- addAppkitPort: (port_t)port;
- removePort: (port_t)port;
- removeAppkitPort: (port_t)port;
@end
@interface NXPhone (RemoteMethods)
/*
* These methods are forwarded to the phone server. Actually they
* are forwarded to a phone object in the phone server.
*/
/*
* Channel Management
*/
- (void)addChannel: (id)channel;
- (void)removeChannel: (id)channel;
- (BOOL)acquireChannel: (id)channel;
- (void)releaseChannel: (id)channel;
@end