Object syntax

In listings of the PPS filesystem, PPS objects have no special identifiers. That is, they will appear just like any other file in a listing. For example, the PPS object "PlayCurrent" in the directory /pps/media will appear in a file listing as simply /pps/media/PlayCurrent.

In the results of a read of a PPS file, the first line identifies the object. This line is prefixed with an "@" character to identify it as the object name. The lines that follow define the object's attributes. These lines have no special prefix.

Suppose the PPS object "PlayCurrent" in the example above contains attributes describing the metadata for the currently playing song in a multimedia application. Let's assume that the attributes have the following format:

@PlayCurrent
author::[Presentation text for track author]
album::[Presentation text for album name]
title::[Presentation text for track title]
duration::[Track duration, floating point number of seconds]
time::[Track position, floating point number of seconds]

An open() call followed by read() call on this file returns the name of the object (the filename, with an "@" prefix), followed by the object's attributes with their values:

@PlayCurrent
author::Beatles
album::Abbey Road
title::Come Together
duration::3.45
time::1.24
Note:
  • Object names may not contain any of the following: "@" (at sign), "?" (question mark), "/" (forward slash), linefeed (ASCII LF), or ASCII NUL.
  • Every line in the PPS object is terminated with a linefeed ("\n" in C, or hexadecimal 0A), so you must encode this character in a manner agreed upon by cooperating client applications. That is, any values containing ASCII LF or NUL characters must be encoded. The encoding field can be used to assist cooperating applications in determining what encoding is used in the value field.
Page updated: