Class ImagerAPI
#include <ImagerAPI.h >
This class is used by other apps to send messages to the imager channel.
Use this interface instead of sending messages directly to ensure message keywords are spelled correctly, all parameters are specified, and error checked.
The receiving app defined this interface to ensure it receives the messages correctly.
UserDevice& device |
the end-user's device |
const string& iid |
image id |
const string& errmsg |
If the image cannot be rendered, output this error message |
const string& action |
(optional) the message keyword to send when user clicks on text (aka request) |
const XMLData& cbdata |
(optional) data to send along with action message |
Render an image to the end-user's device
Return value: true if sent successfully
UserDevice& device |
the end-user's device |
const string& filename |
the image's filename |
const string& filetype |
the images file type, e.g. svg, jpeg, etc. |
const string& filecontent |
the raw content of the image |
int xid |
upload transaction id |
const string& category |
the category for the image Default value: "" |
Save the image (in filecontent) to the image library (ImageLib).
Return value: true if sent successfully
ImageLibId image_id |
the (already assigned) ImageLib id for the image |
const string& filename |
the filename to use for the image |
const string& filetype |
the file type of the image, e.g. svg, jpeg, etc |
const string& filecontent |
the raw data of the image |
const string& category |
the category for the image Default value: "" |
Save the image to the ImageLib along with metadata about the image.
Return value: true if sent successfully
ImageLibId image_id |
the ImageLib id for the image |
FUTURE USE. Update an image in ImageLib, specified by the provided id.
Return value: true if sent successfully
ImageLibId image_id |
the (already assigned) ImageLib id for the image |
const string& filecontent |
the raw data of the image |
Save/Update the image stored in the ImageLib.
Return value: true if sent successfully
ImageLibId image_id |
the ImageLib id for the image |
const string& category |
the new category for the image |
Set the image category for the specified image. Categories are useful for organizing images.
Return value: true if sent successfully
ImageLibId image_id |
the ImageLib id for the image |
const string& name |
the new image filename |
Set the image filename as stored in ImageLib.
Return value: true if sent successfully
ImageLibId image_id |
the ImageLib id for the image |
const string& type |
the new image file type |
Set the image file type as stored in ImageLib.
Return value: true if sent successfully
const string& table |
the image table |
DbRecNum id |
the id in the table |
Assign a new image id to an existing image.
Return value: XMLData["iid"] - the new image id
const string& request |
the request keyword |
const XMLData& params |
the data (parameter payload) Default value: XMLData("") |
Send an API message to channel imager.