/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System.Collections.Generic;
namespace Tizen.Tapi
{
///
/// A class containing information about call idle status notification data.
///
public class CallIdleStatusNotificationData
{
internal uint Id;
internal CallEndCause Cause;
internal CallIdleStatusNotificationData()
{
}
///
/// Notification id.
///
/// Notificatio id in unsigned integer format.
public uint NotiId
{
get
{
return Id;
}
}
///
/// End cause for the call indicates whether the call is released normally or due to some other cause.
///
/// En cause enum value.
public CallEndCause EndCause
{
get
{
return Cause;
}
}
}
///
/// A class which contains calling name information.
///
public class CallerNameInfo
{
internal CallNameMode Mode;
internal string NameData;
internal CallerNameInfo()
{
}
///
/// Display mode of the name.
///
/// Enum value for call name mode
public CallNameMode NameMode
{
get
{
return Mode;
}
}
///
/// Calling party name string.
///
/// String value representing calling party name.
public string Name
{
get
{
return NameData;
}
}
}
///
/// A class which contains details about call information.
///
public class CallIncomingInfo
{
internal uint Handle;
internal CallType Type;
internal string Number;
internal CallerNameInfo Name;
internal CallCliMode Cli;
internal CallNoCliCause Cause;
internal bool IsFwded;
internal CallActiveLine Line;
internal CallIncomingInfo()
{
}
///
/// Call handle indicates the handle of the call for the application.
///
/// Call handle represented in unsigned integer format.
public uint CallHandle
{
get
{
return Handle;
}
}
///
/// Call type.
///
/// Call type indicating whether the requested call is a voice or video call.
public CallType CallType
{
get
{
return Type;
}
}
///
/// Caller number, null terminated ASCII.
///
/// A string representing calling party number.
public string CallerNumber
{
get
{
return Number;
}
}
///
/// Call name info. If there is no information from the network, this information will be null.
///
/// A CallerNameInfo which contains information about the calling party name.
public CallerNameInfo NameInfo
{
get
{
return Name;
}
}
///
/// CLI mode.
///
/// Enum value representing CLI mode.
public CallCliMode CliMode
{
get
{
return Cli;
}
}
///
/// No CLI cause.
///
/// Enum value representing the cause for no CLI.
public CallNoCliCause CliCause
{
get
{
return Cause;
}
}
///
/// Checks whether the incoming call is a forwarded call or not.
///
/// True or false. If the incoming call is a forwarded call, then true else false.
public bool IsForwarded
{
get
{
return IsFwded;
}
}
///
/// Current Active Line.
///
/// Enum value representing call active line.
public CallActiveLine ActiveLine
{
get
{
return Line;
}
}
}
///
/// A class which contains information about call line control.
///
public class CallRecordLineControl
{
internal byte PolarityInc;
internal byte Toggle;
internal byte ReversePol;
internal byte PowerTime;
internal CallRecordLineControl()
{
}
///
/// Polarity included.
///
/// Polarity value represented in byte format.
public byte PolarityIncluded
{
get
{
return PolarityInc;
}
}
///
/// Toggle mode.
///
/// Toggle mode represented in byte format.
public byte ToggleMode
{
get
{
return Toggle;
}
}
///
/// Reverse polarity.
///
/// Reverse polarity value represented in byte format.
public byte ReversePolarity
{
get
{
return ReversePol;
}
}
///
/// Power denial time.
///
/// Time value in byte which represents power denial time.
public byte PowerDenialTime
{
get
{
return PowerTime;
}
}
}
///
/// A class which contains information about call record.
///
public class CallRecord
{
internal uint Id;
internal CallRecordType Type;
internal string Name;
internal string Number;
internal CallRecordLineControl LineCtrl;
internal CallRecord()
{
}
///
/// Call id
///
/// Call id which is represented in unsigned integer format.
public uint CallId
{
get
{
return Id;
}
}
///
/// Call record type.
///
/// An enum value representing the call record type.
public CallRecordType CallRecordType
{
get
{
return Type;
}
}
///
/// Name record.
///
///
/// This value will be filled only if CallRecordType is Name, otherwise it is null.
///
/// Name record represented in string.
public string NameRecord
{
get
{
return Name;
}
}
///
/// Number record.
///
///
/// This value will be filled only if CallRecordType is Record, otherwise it is null.
///
/// Number record reprensented in string.
public string NumberRecord
{
get
{
return Number;
}
}
///
/// Gets the line control info.
///
///
/// This value will be filled only if CallRecordType is LineControl, otherwise it is null.
///
/// An instance of CallRecordLineControl class.
public CallRecordLineControl LineControlInfo
{
get
{
return LineCtrl;
}
}
}
///
/// A class which contains information about call signal notification.
///
public class CallSignalNotification
{
internal CallAlertSignal Signal;
internal CallAlertPitch Pitch;
internal CallToneSignal Tone;
internal CallIsdnAlertSignal Isdn;
internal CallIs54bAlertSignal Is54b;
internal CallSignalNotification()
{
}
///
/// Gets the call signal type.
///
/// Signal type of the call represented as CallAlertSignal enum.
public CallAlertSignal SignalType
{
get
{
return Signal;
}
}
///
/// Gets the call pitch type.
///
/// Pitch type of the call represented as CallAlertPitch enum.
public CallAlertPitch PitchType
{
get
{
return Pitch;
}
}
///
/// Gets the call signal tone type.
///
///
/// This value will be filled only if SignalType is Tone.
///
/// Signal tone type of the call represented in CallToneSignal enum.
public CallToneSignal ToneType
{
get
{
return Tone;
}
}
///
/// Gets the signal ISDN Alert type.
///
///
/// This value will be filled only if SignalType is IsdnAlert.
///
/// Signal ISDN alert type of the call represented in CallIsdnAlertSignal enum.
public CallIsdnAlertSignal IsdnAlertType
{
get
{
return Isdn;
}
}
///
/// Gets the signal IS54B alert type.
///
///
/// This value will be filled only if SignalType is Is54bAlert.
///
/// Signal IS54B alerty type of the call represented in CallIs54bAlertSignal enum.
public CallIs54bAlertSignal Is54bAlertType
{
get
{
return Is54b;
}
}
}
///
/// A class which contains information about call upgrade/downgrade request of VoLTE call.
///
public class CallUpgradeDowngradeRequestNoti
{
internal int Handle;
internal CallConfigType Type;
internal CallUpgradeDowngradeRequestNoti()
{
}
///
/// Gets the call handle.
///
/// Call handle value represented in integer format.
public int CallHandle
{
get
{
return Handle;
}
}
///
/// Gets the call upgrade/downgrade config type.
///
/// Call upgrade/downgrade type represented in CallConfigType enum.
public CallConfigType UpgradeType
{
get
{
return Type;
}
}
}
///
/// A class which contains information about an outgoing call.
///
public class CallInformation
{
private CallType _type;
private EmergencyType _etype;
private string _number;
private CallInformation()
{
}
///
/// A parameterized constructor of CallInformation.
///
/// Type of call(voice, data, video, emergency).
/// Emergency category.
/// Destination phone number.
public CallInformation(CallType type, EmergencyType etype, string phoneNumber)
{
_type = type;
_etype = etype;
_number = phoneNumber;
}
internal CallType Type
{
get
{
return _type;
}
}
internal EmergencyType EType
{
get
{
return _etype;
}
}
internal string PhoneNumber
{
get
{
return _number;
}
}
}
///
/// A class which contains information about call end response data.
///
public class CallEndData
{
private CallEndType _type;
private uint _id;
private CallEndData()
{
}
internal CallEndData(CallEndType type, uint id)
{
_type = type;
_id = id;
}
///
/// End type.
///
public CallEndType Type
{
get
{
return _type;
}
}
///
/// Id.
///
public uint Id
{
get
{
return _id;
}
}
}
///
/// A class which contains information about burst DTMF in CDMA.
///
public class CallBurstDtmfData
{
private string _dtmf;
private CallDtmfPulseWidth _width;
private CallDtmfDigitInterval _interval;
private CallBurstDtmfData()
{
}
///
/// A parameterized constructor of CallBurstDtmfData.
///
/// Burst DTMF string.
/// DTMF Pulse Width.
/// DTMF Inter Digit Interval.
public CallBurstDtmfData(string dtmf, CallDtmfPulseWidth width, CallDtmfDigitInterval interval)
{
_dtmf = dtmf;
_width = width;
_interval = interval;
}
internal string Dtmf
{
get
{
return _dtmf;
}
}
internal CallDtmfPulseWidth Width
{
get
{
return _width;
}
}
internal CallDtmfDigitInterval Interval
{
get
{
return _interval;
}
}
}
///
/// A class which contains information about call status.
///
public class CallStatus
{
private int _handle;
private bool _isMoCall;
private string _number;
private CallType _type;
private CallState _state;
private bool _isConferenceState;
private bool _isVolteCall;
internal CallStatus()
{
}
///
/// Call handle.
///
public int CallHandle
{
get
{
return _handle;
}
internal set
{
_handle = value;
}
}
///
/// Status will be true for MO calls. If MT call, then its false.
///
public bool IsMoCall
{
get
{
return _isMoCall;
}
internal set
{
_isMoCall = value;
}
}
///
/// Mobile number.
///
public string PhoneNumber
{
get
{
return _number;
}
internal set
{
_number = value;
}
}
///
/// Type of call(voice, data, emergency).
///
public CallType Type
{
get
{
return _type;
}
internal set
{
_type = value;
}
}
///
/// Current call state.
///
public CallState State
{
get
{
return _state;
}
internal set
{
_state = value;
}
}
///
/// Whether call is in conference state.
///
public bool IsConferenceState
{
get
{
return _isConferenceState;
}
internal set
{
_isConferenceState = value;
}
}
///
/// Whether call is volte call.
///
public bool IsVolteCall
{
get
{
return _isVolteCall;
}
internal set
{
_isVolteCall = value;
}
}
}
///
/// A class that contains call volume info.
///
public class CallVolumeRecord
{
private SoundDevice _device;
private SoundType _type;
private SoundVolume _volume;
private CallVolumeRecord()
{
}
///
/// A parameterized constructor of CallVolumeRecord.
///
/// Call sound device.
/// Call sound type.
/// Call sound volume.
public CallVolumeRecord(SoundDevice device, SoundType type, SoundVolume volume)
{
_device = device;
_type = type;
_volume = volume;
}
///
/// Call sound device info.
///
public SoundDevice Device
{
get
{
return _device;
}
}
///
/// Call sound type info.
///
public SoundType Type
{
get
{
return _type;
}
}
///
/// Call sound volume info.
///
public SoundVolume Volume
{
get
{
return _volume;
}
}
}
///
/// A class which contains call volume info reponse data.
///
public class CallVolumeInfo
{
private uint _id;
private IEnumerable _recordList;
private CallVolumeInfo()
{
}
internal CallVolumeInfo(uint id, IEnumerable list)
{
_id = id;
_recordList = list;
}
///
/// Record number.
///
public uint RecordId
{
get
{
return _id;
}
}
///
/// Volume info record.
///
public IEnumerable Records
{
get
{
return _recordList;
}
}
}
///
/// A class which contains call sound path and volume information.
///
public class CallSoundPathInfo
{
private SoundPath _path;
private ExtraVolume _exVolume;
private CallSoundPathInfo()
{
}
///
/// A parameterized constructor of CallSoundPathInfo.
///
/// Sound path.
/// Extra volume status.
public CallSoundPathInfo(SoundPath path, ExtraVolume exVolume)
{
_path = path;
_exVolume = exVolume;
}
internal SoundPath Path
{
get
{
return _path;
}
}
internal ExtraVolume ExVolume
{
get
{
return _exVolume;
}
}
}
///
/// A class which contains call mute status reponse data.
///
public class CallMuteStatusRecord
{
private SoundMutePath _path;
private SoundMuteStatus _status;
private CallMuteStatusRecord()
{
}
///
/// A parameterized constructor of CallMuteStatusRecord.
///
/// Mute path.
/// Mute status.
public CallMuteStatusRecord(SoundMutePath path, SoundMuteStatus status)
{
_path = path;
_status = status;
}
///
/// Gets the sound mute path.
///
public SoundMutePath Path
{
get
{
return _path;
}
}
///
/// Gets the sound mute status.
///
public SoundMuteStatus Status
{
get
{
return _status;
}
}
}
}