It seems like the browser you are using has JavaScript disabled. As a result, the site will not function properly. We really want you to enable it so you may experience our site as we intended it. If you have no idea what we are talking about or if you need help, visit http://www.enable-javascript.com×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Oops, it seems like you're using an old browser that we do not fully support. If you're able to, please upgrade your browser here.×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

boolisBlocking()

Checks if the PPS object is in blocking or non-blocking mode.

In blocking mode, calling read() and write() will block until data can be read or written. In non-blocking, read() and write() will fail (error() returns EAGAIN) if data cannot be read or written immediately.

PPS objects are by default opened in non-blocking mode. Appending "?wait" to the file system path defaults to blocking mode.

Note the PPS object must be open to use this method. Otherwise, this method returns false and error() returns EBADF.

Return:

A flag indicating if the PPS object uses blocking or non-blocking I/O.

boolopen (

PpsOpenMode::Typesmode)

If you open this PpsObject in some form of Subscribe mode, it assumes that you intend to actively read from this object every time there is a change. Therefore, isReadyReadEnabled() returns true, and the readyRead() signal will continue to be emitted until you call the read() method. If you do not intend to read it every time the readyRead() signal is emitted, then you should call setReadyReadEnabled(false).

bool *ok)

Reads the current content of PPS object.

If no data is available to read and the PPS object is in blocking mode, then this method will block until data is available for reading. If no data is available to read and the PPS object is in non-blocking mode, then this method will fail and error() returns EAGAIN. Use the readyRead() signal to know when data is available for reading.

Parameters

ok

If not 0: *ok is set to true if the read succeeded; otherwise *ok is set to false. On failure, call error() to identify the cause.

Return:

A buffer containing the data read from the PPS object.

Since:

BlackBerry 10.0.0

boolremove()

Deletes the object managed by this PpsObject from the PPS file system.

Return:

A flag indicating the success of the operation. On failure, call error() to identify the cause.

Since:

BlackBerry 10.0.0

boolsetBlocking (

boolenable)

Toggles blocking or non-blocking I/O for the PPS object.

In blocking mode, calling read() and write() will block until data can be read or written. In non-blocking, read() and write() will fail (error() returns EAGAIN) if data cannot be read or written immediately.

PPS objects are by default opened in non-blocking mode. Appending "?wait" to the file system path defaults to blocking mode.

Parameters

enable

A flag indicating if the PPS object should use blocking or non-blocking I/O.

Return:

A flag indicating the success of the operation. On failure, call error() to identify the cause.

Note:

The PPS object must be open to use this method. Otherwise, this method returns false and error() returns EBADF.

Since:

BlackBerry 10.0.0

boolwrite (

If no data can be written and the PPS object is in blocking mode, then this method will block until the PPS object becomes writable. If no data can be written and the PPS object is in non-blocking mode, then this method will fail and error() returns EAGAIN.

Parameters

byteArray

The buffer that contains the data to write to the PPS object.

Return:

true if the write succeeded, false otherwise. On failure, call error() to identify the cause.

intwriteMessage (

The msg and dat parameters are encoded as part of the raw PPS data to be sent to the opened PPS path.

The msg parameter will be added as the message type. 'ppsData["msg"] = msg' The dat parameter will be added as the data payload. 'ppsData["dat"] = encode( dat )

If no data can be written and the PPS object is in blocking mode, then this method will block until the PPS object becomes writable. If no data can be written and the PPS object is in non-blocking mode, then this method will fail and error() returns EAGAIN.

intwriteMessage (

The msg, id and dat parameters are encoded as part of the raw PPS data to be sent to the opened PPS path.

The msg parameter will be added as the message type. 'ppsData["msg"] = msg' The id parameter will be added as the message identifier. 'ppsData["id"] = id' The dat parameter will be added as the data payload. 'ppsData["dat"] = encode( dat )

If no data can be written and the PPS object is in blocking mode, then this method will block until the PPS object becomes writable. If no data can be written and the PPS object is in non-blocking mode, then this method will fail and error() returns EAGAIN.

bool *ok )

If not 0: On success, *objectAttribute is set to an instance of PpsAttribute that describes the PPS object as a whole. The object will have type String, which will be the name of the PPS object preceded by '@'. The flags will be set to reflect the object state.

ok

If not 0: *ok is set to true if the data could be decoded; otherwise *ok is set to false.

Return:

A QMap<QString,PpsAttribute> containing the data in a hierarchical format.

bool *ok )

Creates PPS data from the supplied message and data content.

This method can simplify creating the PPS data to send to a PPS path.

The msg parameter will be added as the message type. 'ppsData["msg"] = msg' The id parameter will be added as the message identifier. 'ppsData["id"] = id' The dat parameter will be added as the data payload. 'ppsData["dat"] = encode( dat )

If the entire operation is successful, EOK is returned. If there was an error encoding the supplied data, -1 will be returned. If the write failed the return value will be one of the POSIX error codes (from errno.h).

If the entire operation is successful, EOK is returned. If there was an error encoding the supplied data, -1 will be returned. If the write failed the return value will be one of the POSIX error codes (from errno.h).

1. Download the tools

Before you start developing, you'll need to visit the Downloads tab. Here you'll find downloads for the BlackBerry 10 Native SDK, BlackBerry 10 Device Simulator, and some other useful tools.

2. Try the sample apps

Now featuring a filter control, the Sample apps tab allows you to search for samples by name or by feature.

Select either the Core or Cascades radio buttons to display the samples relevant to you.

3. Educate yourself

The Documentation tab contains tons of examples, tutorials, and best practices to guide you along the path towards building an awesome app.

You can access all the documentation that you need in the left-hand navigation.

4. Start developing

The Reference tab is where you'll find essential details about how to use our APIs.

You can use the left-hand navigation to choose how you would like to browse the reference: by module, by topic, or alphabetically. If you have an idea of what you are looking for, start typing it in the Filter box.