Universal Document Shell Plugin Document interface. Through IPluginDocument, caller can open and close a specified document, estimate whether an interface pointer delegates an opened document object, and create a new view object. More...
#include <plugin_document.h>
Data Fields | |
PluginStatus(* | open )(IPluginUnknown *thiz, const UDSString *path) |
Open specified document. | |
PluginStatus(* | add_credentials )(IPluginUnknown *thiz, const UDSString *name, const UDSString *value) |
Supply extra credentials for opening the document. | |
PluginStatus(* | commit_credentials )(IPluginUnknown *thiz) |
Notifies plugin to process the credential information. | |
PluginStatus(* | reset_credentials )(IPluginUnknown *thiz) |
Notifies plugin to remove all credential information. | |
PluginBool(* | is_open )(IPluginUnknown *thiz) |
Check whether the current document object has been opened or not. | |
PluginStatus(* | close )(IPluginUnknown *thiz) |
Close document. This document object won't be destroyed immediately after calling this function. The object can be used to open another document. | |
IPluginUnknown *(* | create_view )(IPluginUnknown *thiz) |
Create view object. |
Universal Document Shell Plugin Document interface. Through IPluginDocument, caller can open and close a specified document, estimate whether an interface pointer delegates an opened document object, and create a new view object.
Copyright (C) 2008 iRex Technologies B.V. All rights reserved.
Definition at line 43 of file plugin_document.h.
PluginStatus(* IPluginDocument::add_credentials)(IPluginUnknown *thiz, const UDSString *name, const UDSString *value) |
Supply extra credentials for opening the document.
This should be called after opening the document, because in most cases only then it is possible to determine if a document needs extra credentials (eg. name/password combination) for opening. After adding the credentials commit_credentials() should be called to notify the plugin that the credentials are complete.
Please note: Always call either commit_credentials() or reset_credentials() to ensure credential information is removed from memory.
thiz | IPluginUnknown pointer of document object. | |
string | name Name of the credentials (eg. "password" or "name"), depending on plugin implementation | |
string | value Value of the credential depending on plugin implementation |
PluginStatus(* IPluginDocument::close)(IPluginUnknown *thiz) |
Close document. This document object won't be destroyed immediately after calling this function. The object can be used to open another document.
thiz | The IPluginUnknown pointer of document object to be closed. |
Referenced by text::PluginDocImpl::PluginDocImpl(), pdf::PluginDocImpl::PluginDocImpl(), and images::PluginDocImpl::PluginDocImpl().
Notifies plugin to process the credential information.
This is called by UDS to notify that the credential information is complete. The plugin now has to store the credential information and verify it if possible. If the credential information cannot be verified without reopening the document, the plugin should return PLUGIN_CREDENTIAL_AUTHORIZATION_PENDING. UDS then will reopen the document.
Please note: If the commit fails or if the authorization failed, reset_credentials has to be called!
Create view object.
thiz | IPluginUnknown pinter of document object. |
Referenced by text::PluginDocImpl::PluginDocImpl(), pdf::PluginDocImpl::PluginDocImpl(), and images::PluginDocImpl::PluginDocImpl().
PluginBool(* IPluginDocument::is_open)(IPluginUnknown *thiz) |
Check whether the current document object has been opened or not.
thiz | The IPluginUnknown pointer of document object. |
Referenced by text::PluginDocImpl::PluginDocImpl(), pdf::PluginDocImpl::PluginDocImpl(), and images::PluginDocImpl::PluginDocImpl().
PluginStatus(* IPluginDocument::open)(IPluginUnknown *thiz, const UDSString *path) |
Open specified document.
thiz | IPluginUnknown pointer of document object. | |
path | The path of the document. |
Referenced by text::PluginDocImpl::PluginDocImpl(), pdf::PluginDocImpl::PluginDocImpl(), and images::PluginDocImpl::PluginDocImpl().
Notifies plugin to remove all credential information.
This function will be called from UDS in these situations: If for some reason commit_credentials() was not called and the credential procedure was aborted. This ensures that credential information() is removed from memory. If commit_credentials() was called but returned an error If commit_credentials() was called but the authorization failed (either reported directly as PLUGIN_CREDENTIAL_AUTHORIZATION_FAILED from commit_credentials() or detected later when reopening the document)