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 () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
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 (css::uno::Reference< css::uno::XComponentContext > xContext, rtl::Reference< ContentProviderImplHelper > xProvider, css::uno::Reference< css::ucb::XContentIdentifier > Identifier)
 
virtual ~ContentImplHelper () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
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=0
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override=0
 
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 OUString SAL_CALL getContentType () override=0
 
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 css::uno::Any SAL_CALL execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override=0
 
virtual void SAL_CALL abort (sal_Int32 CommandId) override=0
 
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

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

Member Typedef Documentation

◆ ContentRef

Definition at line 83 of file gio_content.hxx.

◆ ContentRefList

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

Definition at line 84 of file gio_content.hxx.

Constructor & Destructor Documentation

◆ Content() [1/2]

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 75 of file gio_content.cxx.

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

◆ Content() [2/2]

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 85 of file gio_content.cxx.

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

◆ ~Content()

gio::Content::~Content ( )
overridevirtual

Definition at line 98 of file gio_content.cxx.

References mpFile, and mpInfo.

Member Function Documentation

◆ abort()

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

Implements ucbhelper::ContentImplHelper.

Definition at line 117 of file gio_content.cxx.

◆ acquire()

void SAL_CALL gio::Content::acquire ( )
overridevirtualnoexcept

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1318 of file gio_content.cxx.

◆ copyData()

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

Definition at line 831 of file gio_content.cxx.

References gio::TRANSFER_BUFFER_SIZE.

Referenced by feedSink(), and insert().

◆ createNewContent()

css::uno::Reference< css::ucb::XContent > SAL_CALL gio::Content::createNewContent ( const css::ucb::ContentInfo &  Info)
overridevirtual

◆ destroy()

void gio::Content::destroy ( bool  bDeletePhysical)
private
Exceptions
css::uno::Exception

Definition at line 1026 of file gio_content.cxx.

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

Referenced by execute().

◆ doSetFileInfo()

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

Definition at line 818 of file gio_content.cxx.

References getGFile(), and mbTransient.

Referenced by setPropertyValues().

◆ exchangeIdentity()

bool gio::Content::exchangeIdentity ( const css::uno::Reference< css::ucb::XContentIdentifier > &  xNewId)
private

◆ execute()

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

◆ feedSink()

bool gio::Content::feedSink ( const css::uno::Reference< css::uno::XInterface > &  aSink)
private

◆ getBadArgExcept()

css::uno::Any gio::Content::getBadArgExcept ( )
private

Definition at line 302 of file gio_content.cxx.

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

◆ getCommands()

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

Implements ucbhelper::ContentImplHelper.

Definition at line 1274 of file gio_content.cxx.

References isFolder(), and SAL_N_ELEMENTS.

◆ getContentType()

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

Implements ucbhelper::ContentImplHelper.

Definition at line 124 of file gio_content.cxx.

References gio::GIO_FILE_TYPE, gio::GIO_FOLDER_TYPE, and isFolder().

◆ getFileInfo()

void gio::Content::getFileInfo ( css::uno::Reference< css::ucb::XCommandEnvironment > const &  env,
GFileInfo **  info,
bool  fail 
)
private

◆ getGFile()

GFile * gio::Content::getGFile ( )

◆ getGFileInfo()

GFileInfo * gio::Content::getGFileInfo ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv,
GError **  ppError = nullptr 
)
private

◆ getImplementationId()

virtual css::uno::Sequence< sal_Int8 > SAL_CALL gio::Content::getImplementationId ( )
overridevirtual

Reimplemented from ucbhelper::ContentImplHelper.

◆ getImplementationName()

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

Implements ucbhelper::ContentImplHelper.

Definition at line 1334 of file gio_content.cxx.

◆ getParentURL()

OUString gio::Content::getParentURL ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 104 of file gio_content.cxx.

References getGFile().

Referenced by setPropertyValues().

◆ getProperties()

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

Implements ucbhelper::ContentImplHelper.

Definition at line 1227 of file gio_content.cxx.

References SAL_N_ELEMENTS.

◆ getPropertyValues()

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

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL gio::Content::getSupportedServiceNames ( )
overridevirtual

Implements ucbhelper::ContentImplHelper.

Definition at line 1339 of file gio_content.cxx.

◆ getTypes()

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

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1191 of file gio_content.cxx.

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

◆ insert()

void gio::Content::insert ( const css::uno::Reference< css::io::XInputStream > &  xInputStream,
bool  bReplaceExisting,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

◆ isFolder()

bool gio::Content::isFolder ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv)
private

◆ mapGIOError()

css::uno::Any gio::Content::mapGIOError ( GError *  error)
private

◆ open()

css::uno::Any gio::Content::open ( const css::ucb::OpenCommandArgument2 &  rArg,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

◆ queryChildren()

void gio::Content::queryChildren ( ContentRefList rChildren)
private

◆ queryCreatableContentsInfo() [1/2]

css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL gio::Content::queryCreatableContentsInfo ( )
overridevirtual

Definition at line 1150 of file gio_content.cxx.

References queryCreatableContentsInfo().

Referenced by getPropertyValues(), and queryCreatableContentsInfo().

◆ queryCreatableContentsInfo() [2/2]

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

Definition at line 1126 of file gio_content.cxx.

References cppu::UnoType< typename T >::get(), gio::GIO_FILE_TYPE, gio::GIO_FOLDER_TYPE, isFolder(), and props.

◆ queryInterface()

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

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1328 of file gio_content.cxx.

References cppu::queryInterface().

◆ release()

void SAL_CALL gio::Content::release ( )
overridevirtualnoexcept

Reimplemented from ucbhelper::ContentImplHelper.

Definition at line 1323 of file gio_content.cxx.

◆ setPropertyValues()

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

◆ transfer()

void gio::Content::transfer ( const css::ucb::TransferInfo &  rTransferInfo,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv 
)
private

Member Data Documentation

◆ m_pProvider

ContentProvider* gio::Content::m_pProvider
private

Definition at line 66 of file gio_content.hxx.

Referenced by createNewContent().

◆ mbTransient

bool gio::Content::mbTransient
private

◆ mpFile

GFile* gio::Content::mpFile
private

Definition at line 67 of file gio_content.hxx.

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

◆ mpInfo

GFileInfo* gio::Content::mpInfo
private

Definition at line 68 of file gio_content.hxx.

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


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