From 2e0bedc841c87797147298c6c6cb61cbc044952f Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Wed, 20 Sep 2017 17:21:50 +0300 Subject: [PATCH] TizenRefApp-9395 [Call UI] Add doxygen documentation for Model interface classes Change-Id: Iadc4c6d815e2aeed85490577a18b5b9861dbe7a9 --- call-ui/model/CallUIBuilder.h | 12 ++ call-ui/model/IActiveCall.h | 33 +++- call-ui/model/IBaseCallInfo.h | 19 +++ call-ui/model/ICallInfo.h | 45 ++++++ call-ui/model/ICallListener.h | 14 ++ call-ui/model/ICallManager.h | 33 ++++ call-ui/model/ICallUI.h | 29 ++++ call-ui/model/IConferenceCallInfo.h | 7 + call-ui/model/IContactInfo.h | 19 +++ call-ui/model/IEndCall.h | 15 +- call-ui/model/IHeldCall.h | 41 ++++- call-ui/model/IIncomingCall.h | 36 +++++ call-ui/model/IIndicatorStateListener.h | 9 ++ call-ui/model/IIndicatorStateProvider.h | 15 ++ call-ui/model/IRejectMsg.h | 9 ++ call-ui/model/IRejectMsgProvider.h | 16 ++ call-ui/model/ISoundManager.h | 127 +++++++++++++-- call-ui/model/IndicatorState.h | 62 ++++++++ call-ui/model/impl/EndCall.cpp | 5 - call-ui/model/impl/EndCall.h | 1 - call-ui/model/types.h | 200 ++++++++++++++---------- 21 files changed, 646 insertions(+), 101 deletions(-) diff --git a/call-ui/model/CallUIBuilder.h b/call-ui/model/CallUIBuilder.h index bf23998..8ecfed3 100644 --- a/call-ui/model/CallUIBuilder.h +++ b/call-ui/model/CallUIBuilder.h @@ -25,9 +25,21 @@ namespace callui { UCL_DECLARE_REF_ALIASES(CallUIBuilder); + /** + * @brief Represents builder for CallUI + */ class CallUIBuilder { public: + + /** + * @brief Constructor + */ CallUIBuilder(); + + /** + * @brief Builds CallUI instance + * @return Shared reference to ICallUI + */ ICallUISRef build() const; }; diff --git a/call-ui/model/IActiveCall.h b/call-ui/model/IActiveCall.h index 0252b72..301830b 100644 --- a/call-ui/model/IActiveCall.h +++ b/call-ui/model/IActiveCall.h @@ -26,13 +26,44 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IActiveCall); + /** + * @brief Represents Active call interface for operations with active call + */ class IActiveCall : protected ucl::NonCopyable { public: + + /** + * @brief Gets call info instance + * @return Constant shared reference to ICallInfo + */ virtual ICallInfoSCRef getInfo() const = 0; + + + /** + * @brief Gets dialing mode state + * @return true if dialing mode is ON, false otherwise + */ virtual bool isDialingMode() const = 0; + + /** + * @brief Sets active call into hold state + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result hold() = 0; + + /** + * @brief Sets active call into hold state + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result end() = 0; - virtual ucl::Result split(const IConferenceCallInfoSCRef &confCallInfo) = 0; + + /** + * @brief Splits one call if call is conference + * @param[in] confCallInfo Call info of call that will be split + * @return RES_OK on success or another result otherwise + */ + virtual ucl::Result split( + const IConferenceCallInfoSCRef &confCallInfo) = 0; protected: ~IActiveCall() = default; diff --git a/call-ui/model/IBaseCallInfo.h b/call-ui/model/IBaseCallInfo.h index 2902be3..57b0f91 100644 --- a/call-ui/model/IBaseCallInfo.h +++ b/call-ui/model/IBaseCallInfo.h @@ -23,10 +23,29 @@ namespace callui { + /** + * @brief Represents base Call info interface + * for base Call info operations + */ class IBaseCallInfo : protected ucl::NonCopyable { public: + + /** + * @brief Gets call Id + * @return Call id + */ virtual unsigned int getCallId() const = 0; + + /** + * @brief Gets call phone number + * @return Call phone number + */ virtual const std::string &getPhoneNumber() const = 0; + + /** + * @brief Gets call contact info + * @return Constant shared reference to IContactInfo + */ virtual IContactInfoSCRef getContactInfo() const = 0; protected: diff --git a/call-ui/model/ICallInfo.h b/call-ui/model/ICallInfo.h index 33f1de4..b5e2a35 100644 --- a/call-ui/model/ICallInfo.h +++ b/call-ui/model/ICallInfo.h @@ -31,19 +31,64 @@ namespace callui { using ConfMemberList = std::vector; + /** + * @brief Represents Call info interface to get information about call + */ class ICallInfo : public IBaseCallInfo { public: + + /** + * @brief Gets call duration + * @return Call duration + */ virtual struct tm getDuration() const = 0; + + /** + * @brief Gets whether call is emergency + * @return true if call is emergency or false otherwise + */ virtual bool isEmergency() const = 0; + + /** + * @brief Gets whether call has HD voice + * @return true if call has HD voice or false otherwise + */ virtual bool isHDVoice() const = 0; + + /** + * @brief Gets whether call is forwarded + * @return true if call is forwarded or false otherwise + */ virtual bool isForwarded() const = 0; + + /** + * @brief Gets whether call number is voicemail + * @return true if call number is voicemail or false otherwise + */ virtual bool isVoiceMailNumber() const = 0; + + /** + * @brief Gets call conference members count + * @return Conference members count + */ virtual int getConferenceMemberCount() const = 0; + + /** + * @brief Gets call conference members list + * @return Conference members list + */ virtual const ConfMemberList &getConferenceMemberList() const = 0; + + protected: + ~ICallInfo() = default; }; // Non-member functions // + /** + * @brief Gets whether caller telephone number is unknown + * @return true if call number is unknown or false otherwise + */ bool isUnknownCaller(const ICallInfo &info); } diff --git a/call-ui/model/ICallListener.h b/call-ui/model/ICallListener.h index 071fdd5..b67de1b 100644 --- a/call-ui/model/ICallListener.h +++ b/call-ui/model/ICallListener.h @@ -23,9 +23,23 @@ namespace callui { UCL_DECLARE_REF_ALIASES(ICallListener); + /** + * @brief Represents Call listener interface for getting + * notification from ICall model + */ class ICallListener : protected ucl::NonCopyable { public: + + /** + * @brief Called when new Call event is initiated + * @param[in] type Call event type + */ virtual void onCallEvent(CallEventType type) = 0; + + /** + * @brief Called when some error is happened + * @param[in] err Call error type + */ virtual void onError(CallErr err) = 0; protected: diff --git a/call-ui/model/ICallManager.h b/call-ui/model/ICallManager.h index 9049b0b..544ffbb 100644 --- a/call-ui/model/ICallManager.h +++ b/call-ui/model/ICallManager.h @@ -30,12 +30,45 @@ namespace callui { UCL_DECLARE_REF_ALIASES(ICallManager); + /** + * @brief Represents Call Manager interface for operations with calls + * and their states + */ class ICallManager : protected ucl::NonCopyable { public: + + /** + * @brief Gets incoming call instance + * @return Shared reference to IIncomingCall instance on success + * or NULL otherwise + */ virtual IIncomingCallSRef getIncomingCall() = 0; + + /** + * @brief Gets active call instance + * @return Shared reference to IActiveCall instance on success + * or NULL otherwise + */ virtual IActiveCallSRef getActiveCall() = 0; + + /** + * @brief Gets held call instance + * @return Shared reference to IHeldCall instance on success + * or NULL otherwise + */ virtual IHeldCallSRef getHeldCall() = 0; + + /** + * @brief Gets end call instance + * @return Shared reference to IEndCall instance on success + * or NULL otherwise + */ virtual IEndCallSRef getEndCall() = 0; + + /** + * @brief Gets end call instance + * @return Mask on current available calls + */ virtual CallMask getAvailableCalls() const = 0; protected: diff --git a/call-ui/model/ICallUI.h b/call-ui/model/ICallUI.h index 41f735e..4b95cc1 100644 --- a/call-ui/model/ICallUI.h +++ b/call-ui/model/ICallUI.h @@ -30,12 +30,41 @@ namespace callui { UCL_DECLARE_REF_ALIASES(ICallUI); + /** + * @brief Represents CallUI interface of main model instance + */ class ICallUI : protected ucl::NonCopyable { public: + + /** + * @brief Sets listener + * @param[in] listener Call listener + */ virtual void setListener(const ICallListenerWRef &listener) = 0; + + /** + * @brief Processes app control + * @param[in] appControl App Control handle + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result processAppControl(app_control_h appControl) = 0; + + /** + * @brief Gets sound manager instance + * @return Shared refernce to ISoundManager + */ virtual ISoundManagerSRef getSoundManager() = 0; + + /** + * @brief Gets call manager instance + * @return Shared refernce to ICallManager + */ virtual ICallManagerSRef getCallManager() = 0; + + /** + * @brief Gets indicator state provider instance + * @return Shared refernce to IIndicatorStateProvider + */ virtual IIndicatorStateProviderSRef getIndicatorStateProvider() = 0; protected: diff --git a/call-ui/model/IConferenceCallInfo.h b/call-ui/model/IConferenceCallInfo.h index 387dc7b..a555520 100644 --- a/call-ui/model/IConferenceCallInfo.h +++ b/call-ui/model/IConferenceCallInfo.h @@ -25,7 +25,14 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IConferenceCallInfo); + /** + * @brief Represents conference call info interface for + * getting information about callers in conference call + * @see IBaseCallInfo + */ class IConferenceCallInfo : public IBaseCallInfo { + protected: + ~IConferenceCallInfo() = default; }; } diff --git a/call-ui/model/IContactInfo.h b/call-ui/model/IContactInfo.h index e220555..6264836 100644 --- a/call-ui/model/IContactInfo.h +++ b/call-ui/model/IContactInfo.h @@ -23,10 +23,29 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IContactInfo); + /** + * @brief Represents Contact info interface for operations with call contact info + */ class IContactInfo : protected ucl::NonCopyable { public: + + /** + * @brief Gets contact name + * @return Contact name + */ virtual const std::string &getName() const = 0; + + /** + * @brief Gets path to contact image + * @return Contact image path + */ virtual const std::string &getImagePath() const = 0; + + /** + * @brief Gets name source type + * @remark This is source type from what contact name was took from contact database + * @return Contact name source type + */ virtual ContactNameSourceType getNameSourceType() const = 0; protected: diff --git a/call-ui/model/IEndCall.h b/call-ui/model/IEndCall.h index 4d84144..b644f5c 100644 --- a/call-ui/model/IEndCall.h +++ b/call-ui/model/IEndCall.h @@ -25,11 +25,24 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IEndCall); + /** + * @brief Represents End call interface for operations in end call mode + */ class IEndCall : protected ucl::NonCopyable { public: + + /** + * @brief Gets Call info instance + * @return Shared constant reference to ICallInfo instance on success + * or NULL otherwise + */ virtual ICallInfoSCRef getInfo() const = 0; + + /** + * @brief Initiates recall to the last caller + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result callBack() = 0; - virtual ucl::Result writeMessage() = 0; protected: ~IEndCall() = default; diff --git a/call-ui/model/IHeldCall.h b/call-ui/model/IHeldCall.h index 3fbe90d..c34c46f 100644 --- a/call-ui/model/IHeldCall.h +++ b/call-ui/model/IHeldCall.h @@ -26,14 +26,53 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IHeldCall); + /** + * @brief Represents Held call interface for operations with call on hold + */ class IHeldCall : protected ucl::NonCopyable { public: + + /** + * @brief Gets call info instance + * @return Shared reference to ICallInfo instance + * on success or NULL otherwise + */ virtual ICallInfoSCRef getInfo() const = 0; + + /** + * @brief Unholds call + * @remark this API can be used if there is no other calls except this + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result unhold() = 0; + + /** + * @brief Joins with active call + * @remark this API can be used if there is active call + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result joinWithActive() = 0; + + /** + * @brief Swaps with active call + * @remark this API can be used if there is active call + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result swapWithActive() = 0; + + /** + * @brief Ends call + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result end() = 0; - virtual ucl::Result split(const IConferenceCallInfoSCRef &confCallInfo) = 0; + + /** + * @brief Splits one call if call is conference + * @param[in] confCallInfo Call info of call that will be split + * @return RES_OK on success or another result otherwise + */ + virtual ucl::Result split( + const IConferenceCallInfoSCRef &confCallInfo) = 0; protected: ~IHeldCall() = default; diff --git a/call-ui/model/IIncomingCall.h b/call-ui/model/IIncomingCall.h index 48bfee5..5700ee3 100644 --- a/call-ui/model/IIncomingCall.h +++ b/call-ui/model/IIncomingCall.h @@ -27,13 +27,49 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IIncomingCall); + /** + * @brief Represents Incoming call interface for operations with incoming call + */ class IIncomingCall : protected ucl::NonCopyable { public: + + /** + * @brief Gets call info instance + * @return Shared reference to ICallInfo instance on success + * or NULL otherwise + */ virtual ICallInfoSCRef getInfo() const = 0; + + /** + * @brief Gets reject message provider instance + * @return Shared reference to IRejectMsgProvider instance on success + * or NULL otherwise + */ virtual IRejectMsgProviderSRef getRejectMsgProvider() const = 0; + + /** + * @brief Answers call + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result answer(CallAnswerType type) = 0; + + /** + * @brief Reject call + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result reject() = 0; + + /** + * @brief Reject call with message + * @param[in] message Reject message to send + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result rejectWithMessage(IRejectMsgSRef message) = 0; + + /** + * @brief Stops playing incoming call ringtone + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result stopAlert() = 0; protected: diff --git a/call-ui/model/IIndicatorStateListener.h b/call-ui/model/IIndicatorStateListener.h index 7d42c31..5be4c53 100644 --- a/call-ui/model/IIndicatorStateListener.h +++ b/call-ui/model/IIndicatorStateListener.h @@ -23,8 +23,17 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IIndicatorStateListener); + /** + * @brief Represents Indicator state listener interface for + * getting notification about Indicator components state changes + */ class IIndicatorStateListener: protected ucl::NonCopyable { public: + + /** + * @brief Called on indicator state change + * @param[in] property Indicator property that is changed + */ virtual void onStateChanged(IndicatorProperty property) = 0; protected: diff --git a/call-ui/model/IIndicatorStateProvider.h b/call-ui/model/IIndicatorStateProvider.h index c2271e6..e534924 100644 --- a/call-ui/model/IIndicatorStateProvider.h +++ b/call-ui/model/IIndicatorStateProvider.h @@ -26,9 +26,24 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IIndicatorStateProvider); + /** + * @brief Represents Indicator state provider + * interface for operations with indicator states + */ class IIndicatorStateProvider : protected ucl::NonCopyable { public: + + /** + * @brief Gets indicator state by property type + * @param[in] property Indicator property type + * @return Indicator state instance + */ virtual IndicatorState getState(IndicatorProperty property) const = 0; + + /** + * @brief Sets listener + * @param[in] listener Indicator state listener + */ virtual void setListener(IIndicatorStateListenerWRef listener) = 0; protected: diff --git a/call-ui/model/IRejectMsg.h b/call-ui/model/IRejectMsg.h index a8b8ec7..893cc1e 100644 --- a/call-ui/model/IRejectMsg.h +++ b/call-ui/model/IRejectMsg.h @@ -23,8 +23,17 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IRejectMsg); + /** + * @brief Represents Reject message interface + * for operations with reject message + */ class IRejectMsg : protected ucl::NonCopyable { public: + + /** + * @brief Gets reject message text + * @return Reject message text + */ virtual std::string getText() const = 0; protected: diff --git a/call-ui/model/IRejectMsgProvider.h b/call-ui/model/IRejectMsgProvider.h index 20b395c..8e35a62 100644 --- a/call-ui/model/IRejectMsgProvider.h +++ b/call-ui/model/IRejectMsgProvider.h @@ -25,12 +25,28 @@ namespace callui { UCL_DECLARE_REF_ALIASES(IRejectMsgProvider); + /** + * @brief Represents Reject message provider interface for + * getting reject messages + */ class IRejectMsgProvider : protected ucl::NonCopyable { public: + /** + * @brief List of reject messages + */ using RejectMsgList = std::vector; public: + /** + * @brief Gets reject message list + * @return Reject message list + */ virtual RejectMsgList getMsgList() const = 0; + + /** + * @brief Gets reject message count + * @return Reject message count + */ virtual int getMsgCount() const = 0; protected: diff --git a/call-ui/model/ISoundManager.h b/call-ui/model/ISoundManager.h index fb72896..4012cf9 100644 --- a/call-ui/model/ISoundManager.h +++ b/call-ui/model/ISoundManager.h @@ -23,34 +23,137 @@ namespace callui { UCL_DECLARE_REF_ALIASES(ISoundManager); + /** + * @brief Represents Sound manager interface for operations + * with sound during call + */ class ISoundManager: protected ucl::NonCopyable { public: + + /** + * @brief Sets speaker state + * @param[in] isEnable Speaker state to set + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result setSpeakerState(bool isEnable) = 0; + + /** + * @brief Sets Bluetooth headset connection state + * @param[in] isEnable Bluetooth headset connection state to set + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result setBluetoothState(bool isEnable) = 0; + + /** + * @brief Gets current audio state + * @return Audio state type + */ virtual AudioStateType getAudioState() const = 0; + + /** + * @brief Sets mute state + * @param[in] isEnable Mute state to set + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result setMuteState(bool isEnable) = 0; + + /** + * @brief Gets mute state + * @return Mute state + */ virtual bool getMuteState() const = 0; + + /** + * @brief Starts DTMF signal + * @param[in] dtmfDigit DTMF digit to start + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result startDtmf(const unsigned char dtmfDigit) = 0; + + /** + * @brief Stops DTMF signal + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result stopDtmf() = 0; - virtual void addAudioStateHandler( - NotiHandler handler) = 0; - virtual void delAudioStateHandler( - const NotiHandler &handler) = 0; - virtual void addMuteStateHandler( - NotiHandler handler) = 0; - virtual void delMuteStateHandler( - const NotiHandler &handler) = 0; - virtual void addVolumeStateHandler( - NotiHandler handler) = 0; - virtual void delVolumeStateHandler( - const NotiHandler &handler) = 0; + + /** + * @brief Adds audio state handler + * @param[in] handler Handler to add + */ + virtual void addAudioStateHandler(NotiHandler handler) = 0; + + /** + * @brief Deletes audio state handler + * @param[in] handler Handler to delete + */ + virtual void delAudioStateHandler(const NotiHandler &handler) = 0; + + /** + * @brief Adds mute state handler + * @param[in] handler Handler to add + */ + virtual void addMuteStateHandler(NotiHandler handler) = 0; + + /** + * @brief Deletes mute state handler + * @param[in] handler Handler to delete + */ + virtual void delMuteStateHandler(const NotiHandler &handler) = 0; + + /** + * @brief Adds volume state handler + * @param[in] handler Handler to add + */ + virtual void addVolumeStateHandler(NotiHandler handler) = 0; + + /** + * @brief Deletes volume state handler + * @param[in] handler Handler to delete + */ + virtual void delVolumeStateHandler(const NotiHandler &handler) = 0; + + /** + * @brief Gets max volume level + * @return Max volume level value + */ virtual int getMaxVolume() const = 0; + + /** + * @brief Gets current volume level + * @return Current volume level value + */ virtual int getVolume() const = 0; + + /** + * @brief Sets volume level + * @param[in] value Volume level value to set + * @return RES_OK on success or another result otherwise + */ virtual ucl::Result setVolume(int value) = 0; + + /** + * @brief Checks whether Bluetooth is supported + * @return true is supported, false otherwise + */ virtual bool isBTSupported() const = 0; + + /** + * @brief Checks whether Bluetooth Headset is connected + * @return true if connected, false otherwise + */ virtual bool isBTHeadsetConnected() const = 0; + + /** + * @brief Adds Bluetooth Headset connection change handler + * @param[in] handler Handler to add + */ virtual void addBTHeadsetConnectionChangeHandler( NotiHandler handler) = 0; + + /** + * @brief Deletes Bluetooth Headset connection change handler + * @param[in] handler Handler to delete + */ virtual void delBTHeadsetConnectionChangeHandler( const NotiHandler &handler) = 0; diff --git a/call-ui/model/IndicatorState.h b/call-ui/model/IndicatorState.h index 1fa6a05..36f7424 100644 --- a/call-ui/model/IndicatorState.h +++ b/call-ui/model/IndicatorState.h @@ -21,19 +21,81 @@ namespace callui { + /** + * @brief Represents Indicator state instance + */ struct IndicatorState { uint64_t value; }; + /** + * @brief Gets connection state + * @param[in] state Indicator state + * @return Connection type + */ ConnectionType getConnectionState(IndicatorState state); + + /** + * @brief Gets packet direction + * @param[in] state Indicator state + * @return Packet direction type + */ PacketDirection getPacketDirection(IndicatorState state); + + /** + * @brief Gets RSSI state + * @param[in] state Indicator state + * @return RSSI state + */ RssiState getRssiState(IndicatorState state); + + /** + * @brief Gets roaming state + * @param[in] state Indicator state + * @return true if roaming is on, false otherwise + */ bool getRoamingState(IndicatorState state); + + /** + * @brief Gets battery charge level + * @param[in] state Indicator state + * @return Battery charge level + */ int getBatteryLevel(IndicatorState state); + + /** + * @brief Gets battery state + * @param[in] state Indicator state + * @return Battery state + */ BatteryState getBatteryState(IndicatorState state); + + /** + * @brief Gets voice control state + * @param[in] state Indicator state + * @return true if voice control is on, false otherwise + */ bool getVoiceControlState(IndicatorState state); + + /** + * @brief Gets current active sim slot type + * @param[in] state Indicator state + * @return Sim slot type + */ SimSlot getSimSlotType(IndicatorState state); + + /** + * @brief Gets whether sim must have forwarded state + * @param[in] state Indicator state + * @return true if sim call forwarded state is set, false otherwise + */ bool getSimForwardState(IndicatorState state); + + /** + * @brief Gets whether current call has HD voice + * @param[in] state Indicator state + * @return true if current call has HD voice, false otherwise + */ bool getHDVoiceState(IndicatorState state); } diff --git a/call-ui/model/impl/EndCall.cpp b/call-ui/model/impl/EndCall.cpp index f9e34e3..bc8ca96 100644 --- a/call-ui/model/impl/EndCall.cpp +++ b/call-ui/model/impl/EndCall.cpp @@ -66,9 +66,4 @@ namespace callui { return res; } - Result EndCall::writeMessage() - { - UCL_ASSERT(0, "!!! NOT IMPLEMENTED !!!"); - } - } diff --git a/call-ui/model/impl/EndCall.h b/call-ui/model/impl/EndCall.h index 6812566..1203bc7 100644 --- a/call-ui/model/impl/EndCall.h +++ b/call-ui/model/impl/EndCall.h @@ -37,7 +37,6 @@ namespace callui { virtual ICallInfoSCRef getInfo() const override final; virtual ucl::Result callBack() override final; - virtual ucl::Result writeMessage() override final; private: EndCall(CallManagerWRef cm, ICallInfoSCRef callInfo); diff --git a/call-ui/model/types.h b/call-ui/model/types.h index f91a0ad..7d82b2c 100644 --- a/call-ui/model/types.h +++ b/call-ui/model/types.h @@ -23,121 +23,161 @@ namespace callui { + /** + * @brief Enumeration for call error type + */ enum class CallErr { - DIAL_CANCEL, - DIAL_FAIL, - DIAL_FLIGHT_MODE + DIAL_CANCEL, /**< Dial canceled by system service */ + DIAL_FAIL, /**< Dial on provided number failed */ + DIAL_FLIGHT_MODE /**< Flight mode is on */ }; + /** + * @brief Enumeration for sim slot type + */ enum class SimSlot { - UNDEFINED = 0, - GEAR, - MOBILE_FIRST, - MOBILE_SECOND, - MOBILE_DEFAULT + UNDEFINED = 0, /**< Undefined Sim slot */ + GEAR, /**< Gear Sim card */ + MOBILE_FIRST, /**< Mobile first Sim card */ + MOBILE_SECOND, /**< Mobile second Sim card */ + MOBILE_DEFAULT /**< Mobile default Sim card */ }; + /** + * Enumeration for call answer type + */ enum class CallAnswerType { - NORMAL, - HOLD_ACTIVE_AND_ACCEPT, - RELEASE_ACTIVE_AND_ACCEPT, - RELEASE_HOLD_AND_ACCEPT, - RELEASE_ALL_AND_ACCEPT + NORMAL, /**< Only single call exist, Accept the Incoming call */ + HOLD_ACTIVE_AND_ACCEPT, /**< Put the active call on hold and accepts the call */ + RELEASE_ACTIVE_AND_ACCEPT, /**< Releases the active call and accept the call */ + RELEASE_HOLD_AND_ACCEPT, /**< Releases the held call and accept the call */ + RELEASE_ALL_AND_ACCEPT /**< Releases all calls and accept the call */ }; + /** + * @brief Enumeration for audio state type + */ enum class AudioStateType { - NONE, - SPEAKER, - RECEIVER, - EARJACK, - BT + NONE, /**< None */ + SPEAKER, /**< System LoudSpeaker path */ + RECEIVER, /**< System Receiver */ + EARJACK, /**< Earjack path */ + BT /**< System BT Headset path */ }; + /** + * @brief Enumeration for call flags of current available calls + */ enum { - CALL_FLAG_NONE = 0, - CALL_FLAG_INCOMING = 1, - CALL_FLAG_ACTIVE = 2, - CALL_FLAG_HELD = 4, - CALL_FLAG_END = 8 + CALL_FLAG_NONE = 0, /**< None */ + CALL_FLAG_INCOMING = 1, /**< Incoming call flag value */ + CALL_FLAG_ACTIVE = 2, /**< Active call flag value */ + CALL_FLAG_HELD = 4, /**< Held call flag value */ + CALL_FLAG_END = 8 /**< End call flag value */ }; + /** + * @brief CallMask definition + */ using CallMask = int; + /** + * Enumeration for Call event type + */ enum class CallEventType { - END, - DIALING, - ACTIVE, - HELD, - ALERT, - INCOMING, - WAITING, - JOIN, - SPLIT, - SWAPPED, - RETRIEVED, - SAT_CALL_CONTROL + END, /**< Call End event */ + DIALING, /**< Call Dialing event */ + ACTIVE, /**< Call Active event */ + HELD, /**< Call Held event */ + ALERT, /**< Call Alert event */ + INCOMING, /**< Call Incoming event */ + WAITING, /**< Call Waiting event */ + JOIN, /**< Call Join event */ + SPLIT, /**< Call Split event */ + SWAPPED, /**< Call Swapped event */ + RETRIEVED, /**< Call Retrieved event */ + SAT_CALL_CONTROL /**< Sat call control event */ }; + + /** + * @brief Enumeration for Contact display name source type + */ enum class ContactNameSourceType { - INVALID, - EMAIL, - NUMBER, - NICKNAME, - COMPANY, - NAME + INVALID, /**< Invalid source of display name */ + EMAIL, /**< Produced display name from email record */ + NUMBER, /**< Produced display name from number record */ + NICKNAME, /**< Produced display name from nickname record */ + COMPANY, /**< Produced display name from company record */ + NAME /**< Produced display name from name record */ }; + /** + * @brief Enumeration for Network connection type + */ enum class ConnectionType { - NONE = 0, - EDGE_E, - GPRS_G, - SIMPLE_2G, - HSDPA_H, - HSPA_H_PLUS, - LTE_4G, - UMTS_3G, - UMTS_3G_PLUS, - NO_SIM, - WIFI_00, - WIFI_01, - WIFI_02, - WIFI_03, - WIFI_04, - NO_SIGNAL + NONE = 0, /**< None */ + EDGE_E, /**< EDGE */ + GPRS_G, /**< GPRS */ + SIMPLE_2G, /**< 2G */ + HSDPA_H, /**< HSDPA */ + HSPA_H_PLUS, /**< HSPA Plus */ + LTE_4G, /**< LTE 4G */ + UMTS_3G, /**< UMTS 3G */ + UMTS_3G_PLUS, /**< UMTS 3G Plus */ + NO_SIM, /**< No SIM */ + WIFI_00, /**< WiFi strength level 0 */ + WIFI_01, /**< WiFi strength level 1 */ + WIFI_02, /**< WiFi strength level 2 */ + WIFI_03, /**< WiFi strength level 3 */ + WIFI_04, /**< WiFi strength level 4 */ + NO_SIGNAL, /**< No signal */ }; + /** + * @brief Enumeration for Packet direction type + */ enum class PacketDirection { - NONE = 0, - NO_INPUT, - IN, - OUT, - INOUT + NONE = 0, /**< None */ + NO_INPUT, /**< No input */ + IN, /**< Incoming */ + OUT, /**< Outgoing */ + INOUT /**< Incoming and outgoing */ }; + /** + * @brief Enumeration for RSSI state + */ enum class RssiState { - NONE = 0, - LEVEL_0, - LEVEL_1, - LEVEL_2, - LEVEL_3, - LEVEL_4, - NO_SIGNAL, - FLIGHT_MODE + NONE = 0, /**< None */ + LEVEL_0, /**< Level 0 */ + LEVEL_1, /**< Level 1 */ + LEVEL_2, /**< Level 2 */ + LEVEL_3, /**< Level 3 */ + LEVEL_4, /**< Level 4 */ + NO_SIGNAL, /**< No signal */ + FLIGHT_MODE /**< Flight mode */ }; + /** + * @brief Enumeration for Battery state + */ enum class BatteryState { - NORMAL = 0, - CHARGING, - CHARGING_PROBLEM, - UNKNOWN + NORMAL = 0, /**< Normal battery work flaw */ + CHARGING, /**< Battery is charging */ + CHARGING_PROBLEM, /**< Battery charging issue */ + UNKNOWN /**< Unknown battery state */ }; + /** + * @brief Enumeration for Indicator property type + */ enum class IndicatorProperty { - NW_CONNECTION = 0, - RSSI, - BATTERY, - VOICE_CONTROL, - SIM_SLOT, - HD_VOICE + NW_CONNECTION = 0, /**< Network connection property */ + RSSI, /**< RSSI property */ + BATTERY, /**< Battery property */ + VOICE_CONTROL, /**< Voice control property */ + SIM_SLOT, /**< Sim slot property */ + HD_VOICE /**< Call HD voice property */ }; } -- 2.34.1