Call

Since: BlackBerry 10.0.0

#include <bb/system/phone/Call>

To link against this class, add the following line to your .pro file: LIBS += -lbbsystem

Provides a call's ID, state, and type information.

When an outgoing call is initiated through a Phone object, an instance of this class will be returned to represent the initiated call. If the isValid() function of the object returns true, the client of this object can start to access other properties of the object.

An instance of the Call class will also be provided through the Phone::callUpdated() signal to provide information about an incoming call or update the state of an existing call.

Permissions:

You must also specify the access_phone permission in your bar-descriptor.xml file.


Overview

Public Functions Index

Call ()
Call (const Call &other)
~Call ()
intcallId () const
LineType::TypecallLine () const
CallState::TypecallState () const
CallType::TypecallType () const
boolcanPerformAction (CallAction::Type action) const
boolisValid () const
Call &operator= (const Call &other)
booloperator== (const Call &other)
QStringphoneNumber () const

Public Functions

Call ()

Constructs an invalid Call object.

Since:

BlackBerry 10.0.0

Call (

Creates a copy of other.

Parameters
other

The source Call object.

Since:

BlackBerry 10.0.0

~Call ()

Destructor.

Since:

BlackBerry 10.0.0

int callId ()

Returns the unique ID of the call.

Return:

A non-negative ID of the call if the Call object is valid, or -1 if the object is invalid.

Since:

BlackBerry 10.0.0

LineType::Type callLine ()

Returns the line of the call, as defined by LineType::Type.

Return:

The line of the call. If the Call object is invalid, the return value is undefined.

Since:

BlackBerry 10.3.0

CallState::Type callState ()

Returns the state of the call, as defined by CallState::Type.

Return:

The state of the call. If the Call object is invalid, the return value is undefined.

Since:

BlackBerry 10.0.0

CallType::Type callType ()

Returns the type of the call, as defined by CallType::Type.

Return:

The type of the call. If the Call object is invalid, the return value is undefined.

Since:

BlackBerry 10.0.0

bool canPerformAction (

Checks whether a given action can be performed on the call.

Parameters
action

A call action

Return:

true if the given CallAction can be performed on the call.

Permissions:

The application must have the read_phonecall_details permission to use this feature.

Since:

BlackBerry 10.3.0

bool isValid ()

Indicates whether this object is valid or not.

In general, the properties of this object should be accessed only when the object is valid.

Return:

true if this Call object contains valid information about a call, false otherwise.

Since:

BlackBerry 10.0.0

Call & operator= (

Copies another Call to this object.

Parameters
other

The source Call object.

Return:

The Call instance.

Since:

BlackBerry 10.0.0

bool operator== (

Compares another Call to this object.

Parameters
other

A Call object for comparison.

Return:

true if call id matches, false otherwise.

Since:

BlackBerry 10.0.0

QString phoneNumber ()

Returns the phone number of the remote end of the call.

Returns the phone number of the remote end if the client has read_phonecall_details permission, returns an empty string otherwise.The phone number is considered to be sensitive data, it will be delivered to a client which has the permission. The remote number is the number on the other end of the call. In the case of an outgoing call, it is the number that is being called. In the case of an incoming call, it is the number that is doing the calling. If the call type is "multiparty", phoneNumber() will return an empty string. Note: The application that is asking for the phone number needs to be running in the same perimeter as the line that the call is on. As an example, an application running on the work perimeter will not have access to the phone number on a cellular call. Analogously, an application running on the personal perimeter will not have access to the phone number related to a call on a work line, e.g. a SecuVOICE call. Moreover, for an incoming call on the cellular line, the phone number will be delivered formatted. For an outgoing call, the phone number will be first delivered not formatted on the cellular line. After formatting has been applied to it, the subsequent call updates will have the formatted phone number.

Return:

The phone number of the remote end of the call. If the Call object is invalid, the return value is undefined.

Permissions:

The application must have the read_phonecall_details permission to use this feature.

Since:

BlackBerry 10.3.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus