PushPayload

Since: BlackBerry 10.0.0

#include <bb/network/PushPayload>

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

Encapsulates the push content received from the Push Proxy Gateway (PPG) by way of the Invocation framework.


Overview

Public Functions Index

PushPayload ()
PushPayload (const bb::system::InvokeRequest &invoke)
PushPayload (const PushPayload &other)
~PushPayload ()
QByteArraydata () const
intdataLength () const
QVariantMapheaders () const
QStringid () const
boolisAckRequired () const
boolisValid () const
booloperator!= (const PushPayload &rhs) const
PushPayload &operator= (const PushPayload &rhs)
booloperator== (const PushPayload &rhs) const

Public Functions

PushPayload ()

Creates a new PushPayload object where the push payload is invalid and the validity flag is set to false.

Since:

BlackBerry 10.0.0

PushPayload (

Creates a new PushPayload object based on the invoke request object.

The validity flag will be set to false when the push data in the InvokeRequest object is invalid. You can determine validity of this push payload by calling isValid() before you process the data.

The payload object within the InvokeRequest object contains the following:
  • A push ID

  • The raw push content

  • The headers (key-value pairs of metadata available with the push content)

  • A flag to indicate that application level acknowledgement is required for this push message.

Parameters
invoke

The data used to construct the invoke message.

Since:

BlackBerry 10.0.0

PushPayload (

Creates a copy of of an existing PushPayload object.

Parameters
other

The existing PushPayload object that will be copied.

Since:

BlackBerry 10.0.0

~PushPayload ()

Destructor.

Since:

BlackBerry 10.0.0

QByteArray data ()

Returns the binary data that the push-enabled application received.

Return:

The binary data that the push-enabled application received.

Since:

BlackBerry 10.0.0

int dataLength ()

Returns the length of the push notification data.

Return:

The length of the push notification data.

Since:

BlackBerry 10.0.0

QVariantMap headers ()

Returns the push notification headers.

Return:

The push notification headers.

Since:

BlackBerry 10.0.0

QString id ()

Returns the push identifier.

Return:

The push identifier.

Since:

BlackBerry 10.0.0

bool isAckRequired ()

Indicates whether an acknowledgement is required for this push message.

Return:

true if application level acknowledgement is required, false otherwise. Your application must invoke the acceptPush(const QString &payloadId) function if this function returns true.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether or not data validation is successful.

Return:

true if the push payload is valid, false otherwise

Since:

BlackBerry 10.0.0

bool operator!= (

Compares the push payload objects to see if they are not equal.

Parameters
rhs

The PushPayload object that will be compared.

Return:

true if the push payload objects are not equal, false otherwise.

Since:

BlackBerry 10.0.0

PushPayload & operator= (

Copies the data from an existing PushPayload object.

Parameters
rhs

The existing PushPayload object that will be copied.

Return:

A PushPayload object containing the copied data.

Since:

BlackBerry 10.0.0

bool operator== (

Compares push payload objects to see if they are equal.

Parameters
rhs

The PushPayload object that will be compared.

Return:

true if the push payload objects are equal (attributes have the same value), false otherwise.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



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

comments powered by Disqus