NotebookEntryAttachment
Since: BlackBerry 10.0.0
#include <bb/pim/notebook/NotebookEntryAttachment>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The NotebookEntryAttachment class represents an attachment to a NotebookEntry.
Notebook entry attachments augment the Notebook experience by allowing media such as voice notes and images to be added to notebook entries. Attachments are specified by a MIME type, an account key, and a data ID. The account key and data ID should contain enough information to uniquely identify and retrieve the media item on the system.
The Remember application natively supports a small set of MIME types for NotebookEntryAttachment objects, as documented below, and will ignore attachments whose MIME types it does not recognize. However, you can create arbitrary NotebookEntryAttachment objects to be used in your own applications. In the future, this API may be extended to allow arbitrary MIME types to be registered for use within the Remember application.
The following MIME types are currently supported:
audio/aac
audio/amr
audio/mp4
audio/qcp
audio/basic
audio/ogg
audio/x-aiff
audio/x-midi
audio/x-mpeg
audio/x-mpegurl
audio/x-scpls
audio/x-wav
image/bmp
image/cgm
image/gif
image/ief
image/jpeg
image/pict
image/png
image/svg+xml
image/tiff
image/vnd.djvu
image/x-cmu-raster
image/x-icon
image/x-jg
image/x-macpaint
image/x-photoshop
image/x-portable-anymap
image/x-portable-bitmap
image/x-portable-graymap
image/x-portable-pixmap
image/x-quicktime
image/x-rgb
image/x-xbitmap
image/x-xpixmap
image/x-xwindowdump
video/3gpp
video/3gpp2
video/h264
video/MP2T
video/mp4
video/mpeg
video/mpeg2
video/quicktime
video/vnd.mpegurl
video/x-dv
video/x-m4v
video/x-matroska
video/x-matroska-3d
video/x-ms-asf
video/x-ms-wma
video/x-ms-wmv
video/x-msvideo
video/x-rad-screenplay
video/x-sgi-movie
application/pdf
application/msword
application/vnd.ms-excel
application/vnd.ms-excel.sheet.macroEnabled.12
application/vnd.ms-excel.template.macroEnabled.12
application/vnd.ms-powerpoint
application/vnd.ms-powerpoint.presentation.macroEnabled.12
application/vnd.ms-powerpoint.slideshow.macroEnabled.12
application/vnd.ms-powerpoint.template.macroEnabled.12
application/vnd.ms-word.document.macroEnabled.12
application/vnd.ms-word.template.macroEnabled.12
application/vnd.openxmlformats-officedocument.presentationml.presentation
application/vnd.openxmlformats-officedocument.presentationml.slideshow
application/vnd.openxmlformats-officedocument.presentationml.template
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.openxmlformats-officedocument.spreadsheetml.template
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.openxmlformats-officedocument.wordprocessingml.template
application/zip
text/plain
text/vcard
text/calendar
application/x-x509-ca-cert
For these MIME types, the dataId represents the URL to access the raw file from the file system.
message/rfc822
For this MIME type, the dataId is a uib URL.
// Here's how to create a NotebookEntryAttachment representing a JPEG image. NotebookEntryAttachment attachment; attachment.setMimeType( "image/jpeg" ); attachment.setDataId( "file:///path/to/image" );
Overview
Public Functions Index
NotebookEntryAttachment () | |
NotebookEntryAttachment (const NotebookEntryAttachment &other) | |
~NotebookEntryAttachment () | |
QUrl | dataId () const |
QString | mimeType () const |
bool | operator!= (const NotebookEntryAttachment &other) const |
NotebookEntryAttachment & | operator= (const NotebookEntryAttachment &other) |
bool | operator== (const NotebookEntryAttachment &other) const |
void | setDataId (const QUrl &dataId) |
void | setMimeType (const QString &mimeType) |
Public Functions
Copy constructor.
This function constructs a NotebookEntryAttachment containing exactly the same values as the provided NotebookEntryAttachment.
Parameters | |
---|---|
other |
The NotebookEntryAttachment to be copied. |
BlackBerry 10.0.0
Destructor.
BlackBerry 10.0.0
QUrl
Retrieves the data ID of this NotebookEntryAttachment.
The data ID of this NotebookEntryAttachment.
BlackBerry 10.0.0
QString
Retrieves the MIME type of this NotebookEntryAttachment.
The MIME type of this NotebookEntryAttachment.
BlackBerry 10.0.0
bool
Inequality operator.
This operator returns true if the MIME type, account key, or data ID of the provided NotebookEntryAttachment are different from those of this NotebookEntryAttachment, and returns false otherwise. The QString objects that represent the MIME type and data ID are compared using the QString::compare() function.
Parameters | |
---|---|
other |
The NotebookEntryAttachment to check for inequality. |
true if the provided NotebookEntryAttachment is not equal to this one, false otherwise.
BlackBerry 10.0.0
NotebookEntryAttachment &
Assignment operator.
This operator copies all values from the provided NotebookEntryAttachment into this NotebookEntryAttachment.
Parameters | |
---|---|
other |
The NotebookEntryAttachment from which to copy all values. |
A reference to this NotebookEntryAttachment.
BlackBerry 10.0.0
bool
Equality operator.
This operator returns true if the MIME type, account key, and data ID of the provided NotebookEntryAttachment are equal to those of this NotebookEntryAttachment, and returns false otherwise. The QString objects that represent the MIME type and data ID are compared using the QString::compare() function.
Parameters | |
---|---|
other |
The NotebookEntryAttachment to check for equality. |
true if the provided NotebookEntryAttachment is equal to this one, false otherwise.
BlackBerry 10.0.0
void
Sets the data ID for this NotebookEntryAttachment.
Parameters | |
---|---|
dataId |
The data ID for this NotebookEntryAttachment. |
BlackBerry 10.0.0
void
Sets the MIME type for this NotebookEntryAttachment.
Parameters | |
---|---|
mimeType |
The MIME type for this NotebookEntryAttachment. |
BlackBerry 10.0.0