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

#include <gio_content.hxx>

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

Public Member Functions

 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
 
 Content (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, bool bIsFolder)
 
virtual ~Content () override
 
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
 
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::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
 
css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
GFile * getGFile ()
 
- 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 css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier () 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
 

Private Types

typedef rtl::Reference< ContentContentRef
 
typedef std::vector< ContentRefContentRefList
 

Private Member Functions

GFileInfo * getGFileInfo (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, GError **ppError=nullptr)
 
bool isFolder (const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
css::uno::Any mapGIOError (GError *error)
 
css::uno::Any getBadArgExcept ()
 
css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Sequence< css::beans::Property > &rProperties, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void queryChildren (ContentRefList &rChildren)
 
bool doSetFileInfo (GFileInfo *pNewInfo)
 
css::uno::Any open (const css::ucb::OpenCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void transfer (const css::ucb::TransferInfo &rTransferInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void insert (const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bReplaceExisting, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
void destroy (bool bDeletePhysical)
 
css::uno::Sequence< css::uno::Any > setPropertyValues (const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
 
bool feedSink (const css::uno::Reference< css::uno::XInterface > &aSink)
 
bool exchangeIdentity (const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
 
void getFileInfo (css::uno::Reference< css::ucb::XCommandEnvironment > const &env, GFileInfo **info, bool fail)
 

Static Private Member Functions

static void copyData (const css::uno::Reference< css::io::XInputStream > &xIn, const css::uno::Reference< css::io::XOutputStream > &xOut)
 

Private Attributes

ContentProvider *const m_pProvider
 
GFile * mpFile
 
GFileInfo * mpInfo
 
bool mbTransient
 

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 64 of file gio_content.hxx.

Member Typedef Documentation

Definition at line 84 of file gio_content.hxx.

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

Definition at line 85 of file gio_content.hxx.

Constructor & Destructor Documentation

gio::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier 
)
Exceptions
css::ucb::ContentCreationException

Definition at line 87 of file gio_content.cxx.

References ucbhelper::ContentImplHelper::m_xIdentifier, and SAL_INFO.

gio::Content::Content ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
ContentProvider pProvider,
const css::uno::Reference< css::ucb::XContentIdentifier > &  Identifier,
bool  bIsFolder 
)
Exceptions
css::ucb::ContentCreationException

Definition at line 97 of file gio_content.cxx.

References ucbhelper::ContentImplHelper::m_xIdentifier, mpInfo, and SAL_INFO.

gio::Content::~Content ( )
overridevirtual

Definition at line 110 of file gio_content.cxx.

References mpFile, and mpInfo.

Member Function Documentation

void SAL_CALL gio::Content::abort ( sal_Int32  CommandId)
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 129 of file gio_content.cxx.

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

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1314 of file gio_content.cxx.

void gio::Content::copyData ( const css::uno::Reference< css::io::XInputStream > &  xIn,
const css::uno::Reference< css::io::XOutputStream > &  xOut 
)
staticprivate

Definition at line 827 of file gio_content.cxx.

Referenced by feedSink(), and insert().

css::uno::Reference< css::ucb::XContent > SAL_CALL gio::Content::createNewContent ( const css::ucb::ContentInfo &  Info)
overridevirtual
void gio::Content::destroy ( bool  bDeletePhysical)
private
Exceptions
css::uno::Exception

Definition at line 1022 of file gio_content.cxx.

References ucbhelper::ContentImplHelper::deleted(), and queryChildren().

Referenced by execute().

bool gio::Content::doSetFileInfo ( GFileInfo *  pNewInfo)
private

Definition at line 814 of file gio_content.cxx.

References getGFile(), and mbTransient.

Referenced by setPropertyValues().

bool gio::Content::exchangeIdentity ( const css::uno::Reference< css::ucb::XContentIdentifier > &  xNewId)
private
css::uno::Any SAL_CALL gio::Content::execute ( const css::ucb::Command &  aCommand,
sal_Int32  CommandId,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
overridevirtual
bool gio::Content::feedSink ( const css::uno::Reference< css::uno::XInterface > &  aSink)
private
css::uno::Any gio::Content::getBadArgExcept ( )
private

Definition at line 313 of file gio_content.cxx.

Referenced by execute(), mapGIOError(), and setPropertyValues().

css::uno::Sequence< css::ucb::CommandInfo > gio::Content::getCommands ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1270 of file gio_content.cxx.

References isFolder(), and SAL_N_ELEMENTS.

OUString SAL_CALL gio::Content::getContentType ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 136 of file gio_content.cxx.

References GIO_FILE_TYPE, GIO_FOLDER_TYPE, and isFolder().

void gio::Content::getFileInfo ( css::uno::Reference< css::ucb::XCommandEnvironment > const &  env,
GFileInfo **  info,
bool  fail 
)
private
GFile * gio::Content::getGFile ( )
GFileInfo * gio::Content::getGFileInfo ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv,
GError **  ppError = nullptr 
)
private
virtual css::uno::Sequence< sal_Int8 > SAL_CALL gio::Content::getImplementationId ( )
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

OUString SAL_CALL gio::Content::getImplementationName ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1330 of file gio_content.cxx.

OUString gio::Content::getParentURL ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 116 of file gio_content.cxx.

References getGFile().

Referenced by setPropertyValues().

css::uno::Sequence< css::beans::Property > gio::Content::getProperties ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1223 of file gio_content.cxx.

References SAL_N_ELEMENTS.

css::uno::Reference< css::sdbc::XRow > gio::Content::getPropertyValues ( const css::uno::Sequence< css::beans::Property > &  rProperties,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
css::uno::Sequence< OUString > SAL_CALL gio::Content::getSupportedServiceNames ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1335 of file gio_content.cxx.

css::uno::Sequence< css::uno::Type > SAL_CALL gio::Content::getTypes ( )
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1187 of file gio_content.cxx.

References CPPU_TYPE_REF, cppu::OTypeCollection::getTypes(), and isFolder().

void gio::Content::insert ( const css::uno::Reference< css::io::XInputStream > &  xInputStream,
bool  bReplaceExisting,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
bool gio::Content::isFolder ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private
css::uno::Any gio::Content::mapGIOError ( GError *  error)
private
css::uno::Any gio::Content::open ( const css::ucb::OpenCommandArgument2 &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
void gio::Content::queryChildren ( ContentRefList rChildren)
private
css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL gio::Content::queryCreatableContentsInfo ( )
overridevirtual

Definition at line 1146 of file gio_content.cxx.

Referenced by getPropertyValues().

css::uno::Sequence< css::ucb::ContentInfo > gio::Content::queryCreatableContentsInfo ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
Exceptions
css::uno::RuntimeException

Definition at line 1112 of file gio_content.cxx.

References GIO_FILE_TYPE, GIO_FOLDER_TYPE, and isFolder().

css::uno::Any SAL_CALL gio::Content::queryInterface ( const css::uno::Type &  rType)
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1324 of file gio_content.cxx.

References cppu::queryInterface().

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

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1319 of file gio_content.cxx.

css::uno::Sequence< css::uno::Any > gio::Content::setPropertyValues ( const css::uno::Sequence< css::beans::PropertyValue > &  rValues,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
void gio::Content::transfer ( const css::ucb::TransferInfo &  rTransferInfo,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private
Exceptions
css::uno::Exception

Definition at line 1086 of file gio_content.cxx.

References ucbhelper::cancelCommandExecution(), getGFile(), ucbhelper::ContentImplHelper::m_xIdentifier, mapGIOError(), and OUStringToOString().

Referenced by execute().

Member Data Documentation

ContentProvider* const gio::Content::m_pProvider
private

Definition at line 67 of file gio_content.hxx.

Referenced by createNewContent().

bool gio::Content::mbTransient
private
GFile* gio::Content::mpFile
private

Definition at line 68 of file gio_content.hxx.

Referenced by getGFile(), setPropertyValues(), and ~Content().

GFileInfo* gio::Content::mpInfo
private

Definition at line 69 of file gio_content.hxx.

Referenced by Content(), getGFileInfo(), setPropertyValues(), and ~Content().


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