A
Angus Comber
Hello
I am attempting to build a set of classes which handle telephony. Basically
the handling of phone calls.
My design currently has two main classes - one dealing with the device and
the other with actual calls. So you could say I have a device class and a
calls class. The device here is a telephone handset basically. Telephones
connected to business switchboards can hanlde more than one call at a time -
eg you can have one call on hold while you talk to someone on another call -
there is an active call and a held call.
So is the best bet to have two classes: device class and calls class.
Should calls class inherit from devices class?
With telephony much of the activity is generated from the phone. So a phone
could suddenly receive a call. I want to then pass the activity information
to a program using this class. I am a little unsure as to how I get the
call activity information to my program?
For example, my calls class might have a OnIncomingCall function. But how
does my program 'receive' this notification? I can of course have a
OnIncomingCall function in calls class but if I start my telephone program
by calling devices class - how will my calling program know a call has
happened? Or will the Devices class 'have' a OnIncomingCall function
because of the 'child' Calls class function OnIncomingCall.
I realise this is all probably very basic. But would really appreciate some
guidance.
Angus Comber
(e-mail address removed)
I am attempting to build a set of classes which handle telephony. Basically
the handling of phone calls.
My design currently has two main classes - one dealing with the device and
the other with actual calls. So you could say I have a device class and a
calls class. The device here is a telephone handset basically. Telephones
connected to business switchboards can hanlde more than one call at a time -
eg you can have one call on hold while you talk to someone on another call -
there is an active call and a held call.
So is the best bet to have two classes: device class and calls class.
Should calls class inherit from devices class?
With telephony much of the activity is generated from the phone. So a phone
could suddenly receive a call. I want to then pass the activity information
to a program using this class. I am a little unsure as to how I get the
call activity information to my program?
For example, my calls class might have a OnIncomingCall function. But how
does my program 'receive' this notification? I can of course have a
OnIncomingCall function in calls class but if I start my telephone program
by calling devices class - how will my calling program know a call has
happened? Or will the Devices class 'have' a OnIncomingCall function
because of the 'child' Calls class function OnIncomingCall.
I realise this is all probably very basic. But would really appreciate some
guidance.
Angus Comber
(e-mail address removed)