IPluginDocument Struct Reference

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>

Inheritance diagram for IPluginDocument:
Inheritance graph
[legend]
Collaboration diagram for IPluginDocument:
Collaboration graph
[legend]

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.

Detailed Description

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.


Field Documentation

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.

Parameters:
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
Returns:
PLUGIN_OK Supplied credential name/value is correct
PLUGIN_FAIL Supplied credential name/value is not correct, programming error
PLUGIN_NOT_SUPPORTED Plugin does not support credentials

Close document. This document object won't be destroyed immediately after calling this function. The object can be used to open another document.

Parameters:
thiz The IPluginUnknown pointer of document object to be closed.
Returns:
TODO. Add return code here.

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!

Returns:
PLUGIN_OK Credential information is verified and OK
PLUGIN_CREDENTIAL_AUTHORIZATION_FAILED Credential information is verified but does not match
PLUGIN_CREDENTIAL_AUTHORIZATION_PENDING Credential could not be verified, UDS has to reopen the document
PLUGIN_FAIL Credential information supplied with add_credentials() is not complete
PLUGIN_NOT_SUPPORTED Plugin does not support credentials

Create view object.

Parameters:
thiz IPluginUnknown pinter of document object.
Returns:
Returns the IPluginUnknown pointer of new created view object. If the view object is failed to be created, this function returns NULL.

Referenced by text::PluginDocImpl::PluginDocImpl(), pdf::PluginDocImpl::PluginDocImpl(), and images::PluginDocImpl::PluginDocImpl().

Check whether the current document object has been opened or not.

Parameters:
thiz The IPluginUnknown pointer of document object.
Returns:
Returns PLUGIN_TRUE if the document has been successfully opened, otherwise returns PLUGIN_FALSE.

Referenced by text::PluginDocImpl::PluginDocImpl(), pdf::PluginDocImpl::PluginDocImpl(), and images::PluginDocImpl::PluginDocImpl().

Open specified document.

Parameters:
thiz IPluginUnknown pointer of document object.
path The path of the document.
Returns:
TODO. Add return code here.

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)

Returns:
PLUGIN_OK Credential information is reset
PLUGIN_FAIL Credential information could not be reset
PLUGIN_NOT_SUPPORTED Plugin does not support resetting of credentials

The documentation for this struct was generated from the following file:
Generated by  doxygen 1.6.2-20100208