LibreOffice Module ucb (master)  1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
tdoc_ucp::Content Class Reference

#include <tdoc_content.hxx>

Inheritance diagram for tdoc_ucp::Content:
[legend]
Collaboration diagram for tdoc_ucp::Content:
[legend]

Public Member Functions

virtual ~Content () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () override throw ()
 
virtual void SAL_CALL release () override throw ()
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getContentType () override
 
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier () override
 
virtual css::uno::Any SAL_CALL execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
 
virtual void SAL_CALL abort (sal_Int32 CommandId) override
 
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo () override
 
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent (const css::ucb::ContentInfo &Info) override
 
void notifyDocumentClosed ()
 
void notifyChildRemoved (const OUString &rRelativeChildUri)
 
void notifyChildInserted (const OUString &rRelativeChildUri)
 
rtl::Reference< ContentProvidergetContentProvider () const
 
- Public Member Functions inherited from ucbhelper::ContentImplHelper
 ContentImplHelper (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference< ContentProviderImplHelper > &rxProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
 
virtual ~ContentImplHelper () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override
 
virtual void SAL_CALL addContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
 
virtual void SAL_CALL removeContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
 
virtual sal_Int32 SAL_CALL createCommandIdentifier () override
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
 
virtual void SAL_CALL addCommandInfoChangeListener (const css::uno::Reference< css::ucb::XCommandInfoChangeListener > &Listener) override
 
virtual void SAL_CALL removeCommandInfoChangeListener (const css::uno::Reference< css::ucb::XCommandInfoChangeListener > &Listener) override
 
virtual void SAL_CALL addProperty (const OUString &Name, sal_Int16 Attributes, const css::uno::Any &DefaultValue) override
 
virtual void SAL_CALL removeProperty (const OUString &Name) override
 
virtual void SAL_CALL addPropertySetInfoChangeListener (const css::uno::Reference< css::beans::XPropertySetInfoChangeListener > &Listener) override
 
virtual void SAL_CALL removePropertySetInfoChangeListener (const css::uno::Reference< css::beans::XPropertySetInfoChangeListener > &Listener) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent () override
 
virtual void SAL_CALL setParent (const css::uno::Reference< css::uno::XInterface > &Parent) override
 
const rtl::Reference< ContentProviderImplHelper > & getProvider () const
 

Static Public Member Functions

static Contentcreate (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
 
static Contentcreate (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, const css::ucb::ContentInfo &Info)
 
static css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProperties, ContentProvider *pProvider, const OUString &rContentId)
 

Private Types

enum  ContentState {
  TRANSIENT,
  PERSISTENT,
  DEAD
}
 
typedef rtl::Reference< ContentContentRef
 
typedef std::vector< ContentRefContentRefList
 

Private Member Functions

 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, const ContentProperties &rProps)
 
 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, const css::ucb::ContentInfo &Info)
 
virtual css::uno::Sequence< css::beans::Property > getProperties (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
 
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
 
virtual OUString getParentURL () override
 
bool hasData (const Uri &rUri)
 
bool storeData (const css::uno::Reference< css::io::XInputStream > &xData, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void renameData (const css::uno::Reference< css::ucb::XContentIdentifier > &xOldId, const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
 
bool removeData ()
 
bool copyData (const Uri &rSourceUri, const OUString &rNewName)
 
css::uno::Reference< css::ucb::XContentIdentifier > makeNewIdentifier (const OUString &rTitle)
 
void queryChildren (ContentRefList &rChildren)
 
bool exchangeIdentity (const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
 
css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Sequence< css::beans::Property > &rProperties)
 
css::uno::Sequence< css::uno::Any > setPropertyValues (const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Any open (const css::ucb::OpenCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void insert (const css::uno::Reference< css::io::XInputStream > &xData, sal_Int32 nNameClashResolve, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void destroy (bool bDeletePhysical, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void transfer (const css::ucb::TransferInfo &rInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Reference< css::io::XInputStream > getInputStream (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Reference< css::io::XOutputStream > getTruncatedOutputStream (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Reference< css::ucb::XContent > queryChildContent (const OUString &rRelativeChildUri)
 
css::uno::Reference< css::io::XStream > getStream (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 

Static Private Member Functions

static bool hasData (ContentProvider const *pProvider, const Uri &rUri)
 
static bool loadData (ContentProvider const *pProvider, const Uri &rUri, ContentProperties &rProps)
 
static css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProperties, const ContentProperties &rData, ContentProvider *pProvider, const OUString &rContentId)
 
static bool commitStorage (const css::uno::Reference< css::embed::XStorage > &xStorage)
 
static bool closeOutputStream (const css::uno::Reference< css::io::XOutputStream > &xOut)
 

Private Attributes

ContentProperties m_aProps
 
ContentState m_eState
 
ContentProviderm_pProvider
 

Additional Inherited Members

- Protected Member Functions inherited from ucbhelper::ContentImplHelper
css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bCache=true)
 
css::uno::Reference< css::ucb::XCommandInfo > getCommandInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bCache=true)
 
void notifyPropertiesChange (const css::uno::Sequence< css::beans::PropertyChangeEvent > &evt) const
 
void notifyPropertySetInfoChange (const css::beans::PropertySetInfoChangeEvent &evt) const
 
void notifyContentEvent (const css::ucb::ContentEvent &evt) const
 
void inserted ()
 
void deleted ()
 
bool exchange (const css::uno::Reference< css::ucb::XContentIdentifier > &rNewId)
 
css::uno::Reference< css::ucb::XPersistentPropertySet > getAdditionalPropertySet (bool bCreate)
 
bool renameAdditionalPropertySet (const OUString &rOldKey, const OUString &rNewKey)
 
bool copyAdditionalPropertySet (const OUString &rSourceKey, const OUString &rTargetKey)
 
bool removeAdditionalPropertySet ()
 
- Protected Attributes inherited from ucbhelper::ContentImplHelper
osl::Mutex m_aMutex
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::ucb::XContentIdentifier > m_xIdentifier
 
rtl::Reference< ContentProviderImplHelperm_xProvider
 
sal_uInt32 m_nCommandId
 

Detailed Description

Definition at line 84 of file tdoc_content.hxx.

Member Typedef Documentation

Definition at line 133 of file tdoc_content.hxx.

typedef std::vector< ContentRef > tdoc_ucp::Content::ContentRefList
private

Definition at line 134 of file tdoc_content.hxx.

Member Enumeration Documentation

Enumerator
TRANSIENT 
PERSISTENT 
DEAD 

Definition at line 87 of file tdoc_content.hxx.

Constructor & Destructor Documentation

tdoc_ucp::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
const ContentProperties rProps 
)
private
tdoc_ucp::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
const css::ucb::ContentInfo &  Info 
)
private
Content::~Content ( )
overridevirtual

Definition at line 170 of file tdoc_content.cxx.

Member Function Documentation

void SAL_CALL Content::abort ( sal_Int32  CommandId)
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 611 of file tdoc_content.cxx.

void SAL_CALL Content::acquire ( )
throw (
)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 179 of file tdoc_content.cxx.

bool Content::closeOutputStream ( const css::uno::Reference< css::io::XOutputStream > &  xOut)
staticprivate

Definition at line 2569 of file tdoc_content.cxx.

bool Content::commitStorage ( const css::uno::Reference< css::embed::XStorage > &  xStorage)
staticprivate

Definition at line 2542 of file tdoc_content.cxx.

Referenced by copyData(), and removeData().

bool Content::copyData ( const Uri rSourceUri,
const OUString &  rNewName 
)
private
static Content* tdoc_ucp::Content::create ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier 
)
static
static Content* tdoc_ucp::Content::create ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
const css::ucb::ContentInfo &  Info 
)
static
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL tdoc_ucp::Content::createNewContent ( const css::ucb::ContentInfo &  Info)
overridevirtual
void tdoc_ucp::Content::destroy ( bool  bDeletePhysical,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
bool tdoc_ucp::Content::exchangeIdentity ( const css::uno::Reference< css::ucb::XContentIdentifier > &  xNewId)
private
virtual css::uno::Any SAL_CALL tdoc_ucp::Content::execute ( const css::ucb::Command &  aCommand,
sal_Int32  CommandId,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
overridevirtual
virtual css::uno::Sequence< css::ucb::CommandInfo > tdoc_ucp::Content::getCommands ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overrideprivatevirtual
rtl::Reference< ContentProvider > tdoc_ucp::Content::getContentProvider ( ) const
inline

Definition at line 273 of file tdoc_content.hxx.

References m_pProvider.

OUString SAL_CALL Content::getContentType ( )
overridevirtual
uno::Reference< ucb::XContentIdentifier > SAL_CALL Content::getIdentifier ( )
overridevirtual
virtual css::uno::Sequence< sal_Int8 > SAL_CALL tdoc_ucp::Content::getImplementationId ( )
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

OUString SAL_CALL Content::getImplementationName ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 263 of file tdoc_content.cxx.

css::uno::Reference< css::io::XInputStream > tdoc_ucp::Content::getInputStream ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
Exceptions
css::ucb::CommandFailedException
css::task::DocumentPasswordRequest
css::uno::RuntimeException
OUString Content::getParentURL ( )
overrideprivatevirtual
virtual css::uno::Sequence< css::beans::Property > tdoc_ucp::Content::getProperties ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overrideprivatevirtual
css::uno::Reference< css::sdbc::XRow > tdoc_ucp::Content::getPropertyValues ( const css::uno::Sequence< css::beans::Property > &  rProperties)
private
static css::uno::Reference< css::sdbc::XRow > tdoc_ucp::Content::getPropertyValues ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Sequence< css::beans::Property > &  rProperties,
const ContentProperties rData,
ContentProvider pProvider,
const OUString &  rContentId 
)
staticprivate
static css::uno::Reference< css::sdbc::XRow > tdoc_ucp::Content::getPropertyValues ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Sequence< css::beans::Property > &  rProperties,
ContentProvider pProvider,
const OUString &  rContentId 
)
static
uno::Reference< io::XStream > Content::getStream ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
Exceptions
css::ucb::CommandFailedException
css::task::DocumentPasswordRequest
css::uno::RuntimeException

Definition at line 2734 of file tdoc_content.cxx.

References tdoc_ucp::ContentProperties::getType(), ucbhelper::ContentImplHelper::m_aMutex, m_aProps, m_pProvider, ucbhelper::ContentImplHelper::m_xIdentifier, obtainPassword(), tdoc_ucp::ContentProvider::queryStream(), and tdoc_ucp::STREAM.

uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames ( )
overridevirtual
uno::Reference< io::XOutputStream > Content::getTruncatedOutputStream ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
Exceptions
css::ucb::CommandFailedException
css::task::DocumentPasswordRequest
css::uno::RuntimeException

Definition at line 2721 of file tdoc_content.cxx.

References tdoc_ucp::ContentProperties::getType(), lcl_getTruncatedOutputStream(), m_aProps, m_pProvider, ucbhelper::ContentImplHelper::m_xIdentifier, and tdoc_ucp::STREAM.

uno::Sequence< uno::Type > SAL_CALL Content::getTypes ( )
overridevirtual
bool Content::hasData ( ContentProvider const *  pProvider,
const Uri rUri 
)
staticprivate
bool tdoc_ucp::Content::hasData ( const Uri rUri)
inlineprivate

Definition at line 114 of file tdoc_content.hxx.

References hasData().

Referenced by hasData().

void tdoc_ucp::Content::insert ( const css::uno::Reference< css::io::XInputStream > &  xData,
sal_Int32  nNameClashResolve,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
bool Content::loadData ( ContentProvider const *  pProvider,
const Uri rUri,
ContentProperties rProps 
)
staticprivate
uno::Reference< ucb::XContentIdentifier > Content::makeNewIdentifier ( const OUString &  rTitle)
private
void Content::notifyChildInserted ( const OUString &  rRelativeChildUri)
void Content::notifyChildRemoved ( const OUString &  rRelativeChildUri)
void Content::notifyDocumentClosed ( )
css::uno::Any tdoc_ucp::Content::open ( const css::ucb::OpenCommandArgument2 &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
uno::Reference< ucb::XContent > Content::queryChildContent ( const OUString &  rRelativeChildUri)
private
void Content::queryChildren ( ContentRefList rChildren)
private
uno::Sequence< ucb::ContentInfo > SAL_CALL Content::queryCreatableContentsInfo ( )
overridevirtual
virtual css::uno::Any SAL_CALL tdoc_ucp::Content::queryInterface ( const css::uno::Type &  rType)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

void SAL_CALL Content::release ( )
throw (
)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 187 of file tdoc_content.cxx.

bool Content::removeData ( )
private
void tdoc_ucp::Content::renameData ( const css::uno::Reference< css::ucb::XContentIdentifier > &  xOldId,
const css::uno::Reference< css::ucb::XContentIdentifier > &  xNewId 
)
private
css::uno::Sequence< css::uno::Any > tdoc_ucp::Content::setPropertyValues ( const css::uno::Sequence< css::beans::PropertyValue > &  rValues,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception
bool tdoc_ucp::Content::storeData ( const css::uno::Reference< css::io::XInputStream > &  xData,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::ucb::CommandFailedException
css::task::DocumentPasswordRequest
css::uno::RuntimeException
void tdoc_ucp::Content::transfer ( const css::ucb::TransferInfo &  rInfo,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception

Member Data Documentation

ContentProperties tdoc_ucp::Content::m_aProps
private
ContentState tdoc_ucp::Content::m_eState
private

Definition at line 94 of file tdoc_content.hxx.

Referenced by getIdentifier(), and notifyDocumentClosed().

ContentProvider* tdoc_ucp::Content::m_pProvider
private

The documentation for this class was generated from the following files: