tmozIViewObject Interface Reference

Viewable object. More...

Inheritance diagram for tmozIViewObject:

tmozILocalFile

List of all members.

Public Member Functions

boolean register (in tmozIObjectView ovi)
 Register view.
boolean unRegister ()
 Unregister view.
boolean closeView ()
 Request to close window.
long long getDataSize ()
 Return size of the object.
boolean getDataSource (out AString fileName)
 Return name of data file.
boolean getDataCopy (out AString fileName, in tmozIException tmozException)
 Return copy of the data.
boolean updateData (in AString fileName, in boolean changeType)
 Called by framework to save data.

Public Attributes

readonly attribute tmozIObjectView view
 Associated view.
readonly attribute AString mimeType
 mime-type
readonly attribute AString name
 name of the object


Detailed Description

Viewable object.

Abstract interface representing viewable object. Such object can be displayed in the Tahiti.

View can obtain data using getDataSource or getDataCopy. Type of the file is in the variable mimeType. If the file is displayed view is stored in the member variable view.


Member Function Documentation

boolean closeView (  ) 

Request to close window.

Function close view. User will be asked if modified file should be saved before closing.

Returns:
Return true if view was closed. Return false if view was not closed.

boolean getDataCopy ( out AString  fileName,
in tmozIException  tmozException 
)

Return copy of the data.

Parameters:
tmozException object for exception
Return values:
fileName Copy of the data. It is up to caller to delete this file.
Returns:
Return true if data were copied. Return false if failed.

long long getDataSize (  ) 

Return size of the object.

Returns:
Return size of the object. Return -1 if size cannot be determined.

boolean getDataSource ( out AString  fileName  ) 

Return name of data file.

Function return true if file is directly accessible using this name. Return false is file cannot be accessed directly.

Function have to always return fileName and it can be treated as an original file name.

Return values:
fileName Name of original file or path to the data file
Returns:
Return true if fileName can be access directly. Return false if fileName is only name of the original file. In this case access to access data you have to call getDataCopy

boolean register ( in tmozIObjectView  ovi  ) 

Register view.

Called when new view should be registered. Object have to be without view before calling this method.

Parameters:
ovi New view
Returns:
Return true if view was registered. Return false if registration failed.

boolean unRegister (  ) 

Unregister view.

View have to be unregistered when it is closed.

boolean updateData ( in AString  fileName,
in boolean  changeType 
)

Called by framework to save data.

Function is used by associated view to save new data.

Parameters:
fileName name of input file
changeType True if mime-type should be changed according to fileName. False if mime-type is same as source data.
Returns:
Return true if data were succesfully updated. Return false if update failed.


Member Data Documentation

readonly attribute AString mimeType

mime-type

Mime-type of the object. This is usually fully qualified mime type - e.g. image/jpeg. Sometimes it is generic mime-type octet-stream/binary. In such case real type have to be found.

readonly attribute AString name

name of the object

Name of the object depends on the parent container.

readonly attribute tmozIObjectView view

Associated view.

Can be NULL if view does not exists. Object can be displayed using tmozIDocManager.


Generated on Wed Dec 15 09:54:22 2010 for Tahiti XPCOM API