CallHistoryFilter

Since: BlackBerry 10.3.0

#include <bb/pim/phone/CallHistoryFilter>

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

CallHistoryFilter provides a way to parameterize which calls are fetched.

This class allows you to specify which CallEntry you care about during a fetch via CallHistoryService::callHistory.


Overview

Public Functions Index

CallHistoryFilter ()
CallHistoryFilter (const CallHistoryFilter &other)
~CallHistoryFilter ()
QDateTimeearliest () const
QList< CallEntryId >idFilter () const
QDateTimelatest () const
intlimit () const
intoffset () const
CallHistoryFilter &operator= (const CallHistoryFilter &other)
voidsetDateRange (const QDateTime &earliest, const QDateTime &latest)
voidsetEarliest (const QDateTime &dt)
voidsetIdFilter (const QList< CallEntryId > &idList)
voidsetLatest (const QDateTime &dt)
voidsetLimit (int limit)
voidsetOffset (int offset)
voidsetSortAttribute (CallAttribute::Type type)
voidsetSortOrder (SortOrder::Type type)
voidsetTypeFilter (const CallTypeList &typeList)
CallAttribute::TypesortAttribute () const
SortOrder::TypesortOrder () const
CallTypeListtypeFilter () const

Public Functions

CallHistoryFilter ()

Creates an new filter.

Since:

BlackBerry 10.3.0

CallHistoryFilter (

Copy constructor.

This operator copies all values from the provided CallHistoryFilter into this CallHistoryFilter

Parameters
other

The CallHistoryFilter to be copied.

Since:

BlackBerry 10.3.0

~CallHistoryFilter ()

Destructor.

Since:

BlackBerry 10.3.0

QDateTime earliest ()

Get the QDateTime that represents the "earliest" filter.

Return:

the QDateTime value of the "earliest" filter

Since:

BlackBerry 10.3.0

QList< CallEntryId > idFilter ()

Fetch the ID filter.

Return:

the list that represents the "ID" filter.

Since:

BlackBerry 10.3.0

QDateTime latest ()

Get the QDateTime that represents the "latest" filter.

Return:

the QDateTime value of the "latest" filter

Since:

BlackBerry 10.3.0

int limit ()

Retrieve the limit of the query.

This value represents the maximum number of results that are returned for the result. By default, this value is 0; a value of 0 represents no limit.

Return:

the limit of the query.

Since:

BlackBerry 10.3.0

int offset ()

Retrieve the offset of the query.

Return:

the offset of the query.

Since:

BlackBerry 10.3.0

CallHistoryFilter & operator= (

Assignment operator.

This operator copies all values from the provided CallHistoryFilter into this CallHistoryFilter

Parameters
other

The CallHistoryFilter to be copied.

Since:

BlackBerry 10.3.0

void setDateRange (

Conveniently set the earliest and latest filter in one API call.

Parameters
earliest

The QDateTime to apply for the "earliest" filter.

latest

The QDateTime to apply for the "latest" filter.

Since:

BlackBerry 10.3.0

void setEarliest (

Apply an "earliest" filter.

When a valid datetime is set, the filter will cause fetch operations to return CallEntry whose start date occured on or after dt. A default constructed CallHistoryFilter has this filter disabled.

Parameters
dt

The QDateTime to apply for the "earliest" filter. An invalid QDateTime (i.e. a default constructed QDateTime) disables this filter.

Since:

BlackBerry 10.3.0

void setIdFilter (
  • const QList< CallEntryId > &idList)

Apply an ID filter.

The filter will exclude any calls whose IDs are not in the list.

Parameters
idList

List of CallEntry Log IDs. If this list is empty, this filter is not applied By default, this is empty.

Since:

BlackBerry 10.3.0

void setLatest (

Apply a "latest" filter.

When a valid datetime is set, the filter will cause fetch operations to return CallEntry whose start date occured on or before dt. A default constructed CallHistoryFilter has this filter disabled

Parameters
dt

The QDateTime to apply for the "latest" filter. An invalid QDateTime (i.e. a default constructed QDateTime) disables this filter

Since:

BlackBerry 10.3.0

void setLimit (
  • intlimit)

Sets the result limit of this CallHistoryFilter.

This value represents the maximum number of results that are returned. By default, this value is 0; a value of 0 represents no limit.

Parameters
limit

The upper bound on the number of results to retrieve.

Since:

BlackBerry 10.3.0

void setOffset (
  • intoffset)

Set offset to start query of this CallHistoryFilter.

Offset filters out the results of the fetch whose rank value is less than the offset.

Rank in this context refers to the order in which the results *would* have been returned based on the filter and sorting criteria.

Offset and limit together allows your program to fetch CallEntry in a paginated manner.

Parameters
offset

The offset number to start searching from.

Since:

BlackBerry 10.3.0

void setSortAttribute (

Set the attribute in which the results will be sorted upon.

Warning!

When the chosen sort is by CallAttribute::CallType, the sorting order may not necessarily be the based on the ordinal value of enum CallType; however, the calls of the same type will be placed together.

Since:

BlackBerry 10.3.0

void setSortOrder (

Set the Sort order.

This value represents the direction in which the results will be sorted. The default order is SortOrder::Ascending.

Since:

BlackBerry 10.3.0

void setTypeFilter (

Apply call log type filter.

See CallType for the available types.

Parameters
typeList

A list of accepted types. If list is empty, this filter is not applied. By default, this is empty.

Warning!

CallType::Unknown is ignored; it will not affect the filtering process

See also:

CallType, CallTypeList

Since:

BlackBerry 10.3.0

CallAttribute::Type sortAttribute ()

Retrieve the attribute in which the results will be sorted upon.

Return:

the attribute in which the results will be sorted upon.

Since:

BlackBerry 10.3.0

SortOrder::Type sortOrder ()

Retrieve the Sort order.

This value represents the direction in which the results will be sorted.

Return:

the Sort order.

Since:

BlackBerry 10.3.0

CallTypeList typeFilter ()

Fetch the type filter.

See CallType for the available types.

Return:

the list that represents the "type" filter.

See also:

CallType, CallTypeList

Since:

BlackBerry 10.3.0

Last modified: 2014-09-30



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

comments powered by Disqus