LibreOffice Module ucb (master) 1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
fileaccess::TaskManager Class Reference

#include <filtask.hxx>

Collaboration diagram for fileaccess::TaskManager:
[legend]

Classes

class  MyProperty
 
struct  MyPropertyLess
 
class  TaskHandling
 
class  UnqPathData
 

Public Types

enum class  FileUrlType {
  Folder = 1 ,
  File = -1 ,
  Unknown = 0
}
 
typedef o3tl::sorted_vector< MyProperty, MyPropertyLessPropertySet
 
typedef std::unordered_map< OUString, UnqPathDataContentMap
 

Public Member Functions

 TaskManager (const css::uno::Reference< css::uno::XComponentContext > &rxContext, FileProvider *pProvider, bool bWithConfig)
 
 ~TaskManager ()
 
void startTask (sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &xCommandEnv)
 
sal_Int32 getCommandId ()
 
void installError (sal_Int32 CommandId, sal_Int32 ErrorCode, sal_Int32 minorCode=TASKHANDLER_NO_ERROR)
 The error code may be one of the error codes defined in filerror.hxx. More...
 
void retrieveError (sal_Int32 CommandId, sal_Int32 &ErrorCode, sal_Int32 &minorCode)
 
void endTask (sal_Int32 CommandId, const OUString &aUnqPath, BaseContent *pContent)
 Deinstalls the task and evaluates a possibly set error code. More...
 
void handleTask (sal_Int32 CommandId, const css::uno::Reference< css::task::XInteractionRequest > &request)
 Handles an interactionrequest. More...
 
void clearError (sal_Int32)
 Clears any error which are set on the commandid. More...
 
void registerNotifier (const OUString &aUnqPath, Notifier *pNotifier)
 This two methods register and deregister a change listener for the content belonging to URL aUnqPath. More...
 
void deregisterNotifier (const OUString &aUnqPath, Notifier *pNotifier)
 
void associate (const OUString &UnqPath, const OUString &PropertyName, const css::uno::Any &DefaultValue, const sal_Int16 Attributes)
 Used to associate and deassociate a new property with the content belonging to URL UnqPath. More...
 
void deassociate (const OUString &UnqPath, const OUString &PropertyName)
 
void page (sal_Int32 CommandId, const OUString &aUnqPath, const css::uno::Reference< css::io::XOutputStream > &xOutputStream)
 Given an xOutputStream, this method writes the content of the file belonging to URL aUnqPath into the XOutputStream. More...
 
css::uno::Reference< css::io::XInputStream > open (sal_Int32 CommandId, const OUString &aUnqPath, bool bLock)
 Given a file URL aUnqPath, this methods returns a XInputStream which reads from the open file. More...
 
css::uno::Reference< css::io::XStream > open_rw (sal_Int32 CommandId, const OUString &aUnqPath, bool bLock)
 Given a file URL aUnqPath, this methods returns a XStream which can be used to read and write from/to the file. More...
 
css::uno::Reference< css::ucb::XDynamicResultSet > ls (sal_Int32 CommandId, const OUString &aUnqPath, const sal_Int32 OpenMode, const css::uno::Sequence< css::beans::Property > &sProperty, const css::uno::Sequence< css::ucb::NumberedSortingInfo > &sSortingInfo)
 This method returns the result set containing the children of the directory belonging to file URL aUnqPath. More...
 
css::uno::Reference< css::ucb::XCommandInfo > info_c ()
 Info methods. More...
 
css::uno::Reference< css::beans::XPropertySetInfo > info_p (const OUString &aUnqPath)
 
css::uno::Sequence< css::uno::Any > setv (const OUString &aUnqPath, const css::uno::Sequence< css::beans::PropertyValue > &values)
 Sets the values of the properties belonging to fileURL aUnqPath. More...
 
css::uno::Reference< css::sdbc::XRow > getv (sal_Int32 CommandId, const OUString &aUnqPath, const css::uno::Sequence< css::beans::Property > &properties)
 Reads the values of the properties belonging to fileURL aUnqPath; Returns an XRow object containing the values in the requested order. More...
 
void move (sal_Int32 CommandId, const OUString &srcUnqPath, const OUString &dstUnqPath, const sal_Int32 NameClash)
 Moves the content belonging to fileURL srcUnqPath to fileURL dstUnqPath( files and directories ) More...
 
void copy (sal_Int32 CommandId, const OUString &srcUnqPath, const OUString &dstUnqPath, sal_Int32 NameClash)
 Copies the content belonging to fileURL srcUnqPath to fileURL dstUnqPath ( files and directories ) More...
 
bool remove (sal_Int32 CommandId, const OUString &aUnqPath, FileUrlType eTypeToMove=FileUrlType::Unknown, bool MustExist=true)
 Deletes the content belonging to fileURL aUnqPath( recursively in case of directory ) More...
 
bool mkdir (sal_Int32 CommandId, const OUString &aDirectoryName, bool OverWrite)
 Creates new directory with given URL, recursively if necessary Return:: success of operation. More...
 
bool mkfil (sal_Int32 CommandId, const OUString &aFileName, bool OverWrite, const css::uno::Reference< css::io::XInputStream > &aInputStream)
 Creates new file with given URL. More...
 
bool write (sal_Int32 CommandId, const OUString &aUnqPath, bool OverWrite, const css::uno::Reference< css::io::XInputStream > &aInputStream)
 writes to the file with given URL. More...
 
void insertDefaultProperties (const OUString &aUnqPath)
 

Static Public Member Functions

static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo ()
 
static bool getUnqFromUrl (const OUString &Url, OUString &Unq)
 
static bool getUrlFromUnq (const OUString &Unq, OUString &Url)
 
static void getScheme (OUString &Scheme)
 

Public Attributes

FileProviderm_pProvider
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry
 

Static Public Attributes

static constexpr OUStringLiteral FolderContentType
 
static constexpr OUStringLiteral FileContentType
 

Private Types

typedef std::unordered_map< sal_Int32, TaskHandlingTaskMap
 

Private Member Functions

void insertDefaultProperties (std::unique_lock< std::mutex > &rGuard, const OUString &aUnqPath)
 
std::vector< ContentEventNotifiergetContentEventListeners (const OUString &aName)
 
std::vector< ContentEventNotifiergetContentDeletedEventListeners (const OUString &aName)
 
std::vector< ContentEventNotifiergetContentExchangedEventListeners (const OUString &aOldPrefix, const OUString &aNewPrefix, bool withChildren)
 
std::vector< PropertyChangeNotifiergetPropertyChangeNotifier (const OUString &aName)
 
std::vector< PropertySetInfoChangeNotifiergetPropertySetListeners (const OUString &aName)
 
void erasePersistentSetWithoutChildren (const OUString &aUnqPath)
 
void erasePersistentSet (const OUString &aUnqPath, bool withChildren=false)
 
void copyPersistentSetWithoutChildren (const OUString &srcUnqPath, const OUString &dstUnqPath)
 
void copyPersistentSet (const OUString &srcUnqPath, const OUString &dstUnqPath, bool withChildren)
 
bool getv (const css::uno::Sequence< css::beans::Property > &properties, osl::DirectoryItem &DirItem, OUString &aUnqPath, bool &bIsRegular, css::uno::Reference< css::sdbc::XRow > &row)
 
void load (const TaskManager::ContentMap::iterator &it, bool create)
 Load the properties from configuration, if create == true create them. More...
 
void commit (std::unique_lock< std::mutex > &rGuard, const TaskManager::ContentMap::iterator &it, const osl::FileStatus &aFileStatus)
 Commit inserts the determined properties in the filestatus object into the internal map, so that is possible to determine on a subsequent setting of file properties which properties have changed without filestat. More...
 
osl::FileBase::RC copy_recursive (const OUString &srcUnqPath, const OUString &dstUnqPath, FileUrlType TypeToCopy, bool testExistence)
 
bool ensuredir (sal_Int32 CommandId, const OUString &aDirectoryName, sal_Int32 errorCode)
 

Static Private Member Functions

static void notifyPropertyChanges (const std::vector< PropertyChangeNotifier > &listeners, const css::uno::Sequence< css::beans::PropertyChangeEvent > &seqChanged)
 
static void notifyContentExchanged (const std::vector< ContentEventNotifier > &listeners_vec)
 
static void notifyInsert (const std::vector< ContentEventNotifier > &listeners, const OUString &aChildName)
 
static void notifyContentDeleted (const std::vector< ContentEventNotifier > &listeners)
 
static void notifyContentRemoved (const std::vector< ContentEventNotifier > &listeners, const OUString &aChildName)
 
static void notifyPropertyAdded (const std::vector< PropertySetInfoChangeNotifier > &listeners, const OUString &aPropertyName)
 
static void notifyPropertyRemoved (const std::vector< PropertySetInfoChangeNotifier > &listeners, const OUString &aPropertyName)
 
static void getMaskFromProperties (sal_Int32 &n_Mask, const css::uno::Sequence< css::beans::Property > &seq)
 Given a Sequence of properties seq, this method determines the mask used to instantiate an osl::FileStatus, so that a call to osl::DirectoryItem::getFileStatus fills the required fields. More...
 

Private Attributes

std::mutex m_aMutex
 
sal_Int32 m_nCommandId
 
TaskMap m_aTaskMap
 
ContentMap m_aContent
 
PropertySet m_aDefaultProperties
 
css::uno::Sequence< css::ucb::CommandInfo > m_sCommandInfo
 

Friends

class XPropertySetInfo_impl
 
class XResultSet_impl
 
class XCommandInfo_impl
 

Detailed Description

Definition at line 69 of file filtask.hxx.

Member Typedef Documentation

◆ ContentMap

typedef std::unordered_map< OUString,UnqPathData > fileaccess::TaskManager::ContentMap

Definition at line 217 of file filtask.hxx.

◆ PropertySet

Definition at line 199 of file filtask.hxx.

◆ TaskMap

typedef std::unordered_map< sal_Int32,TaskHandling > fileaccess::TaskManager::TaskMap
private

Definition at line 149 of file filtask.hxx.

Member Enumeration Documentation

◆ FileUrlType

Enumerator
Folder 
File 
Unknown 

Definition at line 406 of file filtask.hxx.

Constructor & Destructor Documentation

◆ TaskManager()

TaskManager::TaskManager ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
FileProvider pProvider,
bool  bWithConfig 
)

Definition at line 135 of file filtask.cxx.

References cppu::UnoType< typename T >::get().

◆ ~TaskManager()

TaskManager::~TaskManager ( )

Definition at line 361 of file filtask.cxx.

Member Function Documentation

◆ associate()

void TaskManager::associate ( const OUString &  UnqPath,
const OUString &  PropertyName,
const css::uno::Any &  DefaultValue,
const sal_Int16  Attributes 
)

Used to associate and deassociate a new property with the content belonging to URL UnqPath.

The default value and the attributes are input

Exceptions
css::beans::PropertyExistException
css::beans::IllegalTypeException
css::uno::RuntimeException

Definition at line 529 of file filtask.cxx.

References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), getPropertySetListeners(), load(), m_aContent, m_aDefaultProperties, m_aMutex, notifyPropertyAdded(), and THROW_WHERE.

Referenced by fileaccess::BaseContent::addProperty().

◆ clearError()

void TaskManager::clearError ( sal_Int32  CommandId)

Clears any error which are set on the commandid.

Definition at line 413 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

Referenced by fileaccess::BaseContent::insert().

◆ commit()

void TaskManager::commit ( std::unique_lock< std::mutex > &  rGuard,
const TaskManager::ContentMap::iterator &  it,
const osl::FileStatus aFileStatus 
)
private

Commit inserts the determined properties in the filestatus object into the internal map, so that is possible to determine on a subsequent setting of file properties which properties have changed without filestat.

Definition at line 2250 of file filtask.cxx.

References CasePreservingURL(), CreatableContentsInfo(), DateModified(), insertDefaultProperties(), IsCompactDisc(), IsDocument(), IsFloppy(), IsFolder(), IsHidden(), IsReadOnly(), IsRemote(), IsRemoveable(), IsVolume(), queryCreatableContentsInfo(), SAL_WARN, and Title.

◆ copy()

void TaskManager::copy ( sal_Int32  CommandId,
const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
sal_Int32  NameClash 
)

◆ copy_recursive()

osl::FileBase::RC TaskManager::copy_recursive ( const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
FileUrlType  TypeToCopy,
bool  testExistence 
)
private

Definition at line 1994 of file filtask.cxx.

References copy_recursive(), err, File, Folder, and fileaccess::osl_File_copy().

Referenced by copy(), and copy_recursive().

◆ copyPersistentSet()

void TaskManager::copyPersistentSet ( const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
bool  withChildren 
)
private

◆ copyPersistentSetWithoutChildren()

void TaskManager::copyPersistentSetWithoutChildren ( const OUString &  srcUnqPath,
const OUString &  dstUnqPath 
)
private

Definition at line 2850 of file filtask.cxx.

References m_xFileRegistry.

Referenced by copyPersistentSet().

◆ deassociate()

void TaskManager::deassociate ( const OUString &  UnqPath,
const OUString &  PropertyName 
)

◆ deregisterNotifier()

void TaskManager::deregisterNotifier ( const OUString &  aUnqPath,
Notifier pNotifier 
)

Definition at line 502 of file filtask.cxx.

References m_aContent, and m_aMutex.

Referenced by fileaccess::BaseContent::~BaseContent().

◆ endTask()

void TaskManager::endTask ( sal_Int32  CommandId,
const OUString &  aUnqPath,
BaseContent pContent 
)

Deinstalls the task and evaluates a possibly set error code.

"endTask" throws in case an error code is set the corresponding exception.

Definition at line 382 of file filtask.cxx.

References m_aMutex, m_aTaskMap, TASKHANDLER_NO_ERROR, and fileaccess::throw_handler().

Referenced by fileaccess::BaseContent::endTask().

◆ ensuredir()

bool TaskManager::ensuredir ( sal_Int32  CommandId,
const OUString &  aDirectoryName,
sal_Int32  errorCode 
)
private

◆ erasePersistentSet()

void TaskManager::erasePersistentSet ( const OUString &  aUnqPath,
bool  withChildren = false 
)
private

Definition at line 2812 of file filtask.cxx.

References erasePersistentSetWithoutChildren(), fileaccess::isChild(), and m_xFileRegistry.

Referenced by move(), and remove().

◆ erasePersistentSetWithoutChildren()

void TaskManager::erasePersistentSetWithoutChildren ( const OUString &  aUnqPath)
private

Definition at line 2792 of file filtask.cxx.

References m_aContent, m_aMutex, and m_xFileRegistry.

Referenced by erasePersistentSet().

◆ getCommandId()

sal_Int32 TaskManager::getCommandId ( )

Definition at line 448 of file filtask.cxx.

References m_aMutex, and m_nCommandId.

Referenced by fileaccess::BaseContent::createCommandIdentifier().

◆ getContentDeletedEventListeners()

std::vector< ContentEventNotifier > TaskManager::getContentDeletedEventListeners ( const OUString &  aName)
private

Definition at line 2572 of file filtask.cxx.

References aName, m_aContent, and m_aMutex.

Referenced by remove().

◆ getContentEventListeners()

std::vector< ContentEventNotifier > TaskManager::getContentEventListeners ( const OUString &  aName)
private

Definition at line 2550 of file filtask.cxx.

References aName, m_aContent, and m_aMutex.

Referenced by copy(), ensuredir(), mkdir(), mkfil(), and move().

◆ getContentExchangedEventListeners()

std::vector< ContentEventNotifier > TaskManager::getContentExchangedEventListeners ( const OUString &  aOldPrefix,
const OUString &  aNewPrefix,
bool  withChildren 
)
private

Definition at line 2663 of file filtask.cxx.

References count, fileaccess::isChild(), m_aContent, m_aMutex, and fileaccess::newName().

Referenced by move().

◆ getMaskFromProperties()

void TaskManager::getMaskFromProperties ( sal_Int32 &  n_Mask,
const css::uno::Sequence< css::beans::Property > &  seq 
)
staticprivate

Given a Sequence of properties seq, this method determines the mask used to instantiate an osl::FileStatus, so that a call to osl::DirectoryItem::getFileStatus fills the required fields.

Definition at line 2155 of file filtask.cxx.

References CasePreservingURL(), ContentType(), DateModified(), IsCompactDisc(), IsDocument(), IsFloppy(), IsFolder(), IsHidden(), IsReadOnly(), IsRemote(), IsRemoveable(), IsVolume(), and Title.

◆ getPropertyChangeNotifier()

std::vector< PropertyChangeNotifier > TaskManager::getPropertyChangeNotifier ( const OUString &  aName)
private

Definition at line 2756 of file filtask.cxx.

References aName, m_aContent, and m_aMutex.

Referenced by setv().

◆ getPropertySetListeners()

std::vector< PropertySetInfoChangeNotifier > TaskManager::getPropertySetListeners ( const OUString &  aName)
private

Definition at line 2621 of file filtask.cxx.

References aName, m_aContent, and m_aMutex.

Referenced by associate(), and deassociate().

◆ getScheme()

void TaskManager::getScheme ( OUString &  Scheme)
static

Definition at line 2934 of file filtask.cxx.

References Scheme.

Referenced by fileaccess::FileContentIdentifier::FileContentIdentifier().

◆ getUnqFromUrl()

bool TaskManager::getUnqFromUrl ( const OUString &  Url,
OUString &  Unq 
)
static

◆ getUrlFromUnq()

bool TaskManager::getUrlFromUnq ( const OUString &  Unq,
OUString &  Url 
)
static

◆ getv() [1/2]

bool fileaccess::TaskManager::getv ( const css::uno::Sequence< css::beans::Property > &  properties,
osl::DirectoryItem &  DirItem,
OUString &  aUnqPath,
bool &  bIsRegular,
css::uno::Reference< css::sdbc::XRow > &  row 
)
private

◆ getv() [2/2]

css::uno::Reference< css::sdbc::XRow > fileaccess::TaskManager::getv ( sal_Int32  CommandId,
const OUString &  aUnqPath,
const css::uno::Sequence< css::beans::Property > &  properties 
)

Reads the values of the properties belonging to fileURL aUnqPath; Returns an XRow object containing the values in the requested order.

Referenced by fileaccess::BaseContent::getPropertyValues(), and fileaccess::XResultSet_impl::OneMore().

◆ handleTask()

void TaskManager::handleTask ( sal_Int32  CommandId,
const css::uno::Reference< css::task::XInteractionRequest > &  request 
)

Handles an interactionrequest.

Definition at line 455 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

Referenced by fileaccess::BaseContent::insert().

◆ info_c()

uno::Reference< XCommandInfo > TaskManager::info_c ( )

Info methods.

Definition at line 805 of file filtask.cxx.

References XCommandInfo_impl.

Referenced by fileaccess::BaseContent::getCommandInfo().

◆ info_p()

uno::Reference< beans::XPropertySetInfo > TaskManager::info_p ( const OUString &  aUnqPath)

◆ insertDefaultProperties() [1/2]

void TaskManager::insertDefaultProperties ( const OUString &  aUnqPath)

◆ insertDefaultProperties() [2/2]

void TaskManager::insertDefaultProperties ( std::unique_lock< std::mutex > &  rGuard,
const OUString &  aUnqPath 
)
private

◆ installError()

void TaskManager::installError ( sal_Int32  CommandId,
sal_Int32  ErrorCode,
sal_Int32  minorCode = TASKHANDLER_NO_ERROR 
)

The error code may be one of the error codes defined in filerror.hxx.

The minor code refines the information given in ErrorCode.

Definition at line 436 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

Referenced by copy(), ensuredir(), fileaccess::BaseContent::execute(), fileaccess::BaseContent::insert(), ls(), mkdir(), move(), open(), fileaccess::BaseContent::open(), open_rw(), page(), remove(), fileaccess::BaseContent::transfer(), and write().

◆ load()

void TaskManager::load ( const TaskManager::ContentMap::iterator &  it,
bool  create 
)
private

Load the properties from configuration, if create == true create them.

The Properties are stored under the url belonging to it->first.

Definition at line 2198 of file filtask.cxx.

References create(), and m_xFileRegistry.

Referenced by associate(), deassociate(), insertDefaultProperties(), and setv().

◆ ls()

uno::Reference< XDynamicResultSet > TaskManager::ls ( sal_Int32  CommandId,
const OUString &  aUnqPath,
const sal_Int32  OpenMode,
const css::uno::Sequence< css::beans::Property > &  sProperty,
const css::uno::Sequence< css::ucb::NumberedSortingInfo > &  sSortingInfo 
)

This method returns the result set containing the children of the directory belonging to file URL aUnqPath.

Definition at line 774 of file filtask.cxx.

References installError(), p, TASKHANDLER_NO_ERROR, and XResultSet_impl.

Referenced by fileaccess::BaseContent::open().

◆ mkdir()

bool TaskManager::mkdir ( sal_Int32  CommandId,
const OUString &  aDirectoryName,
bool  OverWrite 
)

Creates new directory with given URL, recursively if necessary Return:: success of operation.

Definition at line 1675 of file filtask.cxx.

References ensuredir(), getContentEventListeners(), fileaccess::getParentName(), installError(), notifyInsert(), TASKHANDLING_CREATEDIRECTORY_MKDIR, TASKHANDLING_FOLDER_EXISTS_MKDIR, and TASKHANDLING_INVALID_NAME_MKDIR.

Referenced by fileaccess::BaseContent::insert().

◆ mkfil()

bool TaskManager::mkfil ( sal_Int32  CommandId,
const OUString &  aFileName,
bool  OverWrite,
const css::uno::Reference< css::io::XInputStream > &  aInputStream 
)

Creates new file with given URL.

The content of aInputStream becomes the content of the file Return:: success of operation

Definition at line 1735 of file filtask.cxx.

References getContentEventListeners(), fileaccess::getParentName(), notifyInsert(), and write().

Referenced by fileaccess::BaseContent::insert().

◆ move()

void TaskManager::move ( sal_Int32  CommandId,
const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
const sal_Int32  NameClash 
)

◆ notifyContentDeleted()

void TaskManager::notifyContentDeleted ( const std::vector< ContentEventNotifier > &  listeners)
staticprivate

Definition at line 2601 of file filtask.cxx.

Referenced by remove().

◆ notifyContentExchanged()

void TaskManager::notifyContentExchanged ( const std::vector< ContentEventNotifier > &  listeners_vec)
staticprivate

Definition at line 2745 of file filtask.cxx.

Referenced by move().

◆ notifyContentRemoved()

void TaskManager::notifyContentRemoved ( const std::vector< ContentEventNotifier > &  listeners,
const OUString &  aChildName 
)
staticprivate

Definition at line 2610 of file filtask.cxx.

Referenced by move().

◆ notifyInsert()

void TaskManager::notifyInsert ( const std::vector< ContentEventNotifier > &  listeners,
const OUString &  aChildName 
)
staticprivate

Definition at line 2592 of file filtask.cxx.

Referenced by copy(), ensuredir(), mkdir(), mkfil(), and move().

◆ notifyPropertyAdded()

void TaskManager::notifyPropertyAdded ( const std::vector< PropertySetInfoChangeNotifier > &  listeners,
const OUString &  aPropertyName 
)
staticprivate

Definition at line 2641 of file filtask.cxx.

Referenced by associate().

◆ notifyPropertyChanges()

void TaskManager::notifyPropertyChanges ( const std::vector< PropertyChangeNotifier > &  listeners,
const css::uno::Sequence< css::beans::PropertyChangeEvent > &  seqChanged 
)
staticprivate

Definition at line 2776 of file filtask.cxx.

Referenced by setv().

◆ notifyPropertyRemoved()

void TaskManager::notifyPropertyRemoved ( const std::vector< PropertySetInfoChangeNotifier > &  listeners,
const OUString &  aPropertyName 
)
staticprivate

Definition at line 2651 of file filtask.cxx.

Referenced by deassociate().

◆ open()

uno::Reference< io::XInputStream > TaskManager::open ( sal_Int32  CommandId,
const OUString &  aUnqPath,
bool  bLock 
)

Given a file URL aUnqPath, this methods returns a XInputStream which reads from the open file.

Definition at line 711 of file filtask.cxx.

References installError(), and TASKHANDLER_NO_ERROR.

Referenced by fileaccess::BaseContent::open().

◆ open_rw()

uno::Reference< io::XStream > TaskManager::open_rw ( sal_Int32  CommandId,
const OUString &  aUnqPath,
bool  bLock 
)

Given a file URL aUnqPath, this methods returns a XStream which can be used to read and write from/to the file.

Definition at line 743 of file filtask.cxx.

References installError(), and TASKHANDLER_NO_ERROR.

Referenced by fileaccess::BaseContent::open().

◆ page()

void TaskManager::page ( sal_Int32  CommandId,
const OUString &  aUnqPath,
const css::uno::Reference< css::io::XOutputStream > &  xOutputStream 
)

Given an xOutputStream, this method writes the content of the file belonging to URL aUnqPath into the XOutputStream.

Definition at line 622 of file filtask.cxx.

References err, installError(), TASKHANDLING_BUFFERSIZEEXCEEDED_FOR_PAGING, TASKHANDLING_IOEXCEPTION_FOR_PAGING, TASKHANDLING_NOTCONNECTED_FOR_PAGING, TASKHANDLING_OPEN_FILE_FOR_PAGING, and TASKHANDLING_READING_FILE_FOR_PAGING.

Referenced by fileaccess::BaseContent::open().

◆ queryCreatableContentsInfo()

uno::Sequence< ucb::ContentInfo > TaskManager::queryCreatableContentsInfo ( )
static

◆ registerNotifier()

void TaskManager::registerNotifier ( const OUString &  aUnqPath,
Notifier pNotifier 
)

This two methods register and deregister a change listener for the content belonging to URL aUnqPath.

Definition at line 483 of file filtask.cxx.

References m_aContent, and m_aMutex.

Referenced by fileaccess::BaseContent::insert().

◆ remove()

bool TaskManager::remove ( sal_Int32  CommandId,
const OUString &  aUnqPath,
FileUrlType  eTypeToMove = FileUrlType::Unknown,
bool  MustExist = true 
)

◆ retrieveError()

void TaskManager::retrieveError ( sal_Int32  CommandId,
sal_Int32 &  ErrorCode,
sal_Int32 &  minorCode 
)

Definition at line 422 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

◆ setv()

uno::Sequence< uno::Any > TaskManager::setv ( const OUString &  aUnqPath,
const css::uno::Sequence< css::beans::PropertyValue > &  values 
)

◆ startTask()

void TaskManager::startTask ( sal_Int32  CommandId,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xCommandEnv 
)
Exceptions
css::ucb::DuplicateCommandIdentifierException

Definition at line 367 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

Referenced by fileaccess::BaseContent::execute().

◆ write()

bool TaskManager::write ( sal_Int32  CommandId,
const OUString &  aUnqPath,
bool  OverWrite,
const css::uno::Reference< css::io::XInputStream > &  aInputStream 
)

Friends And Related Function Documentation

◆ XCommandInfo_impl

friend class XCommandInfo_impl
friend

Definition at line 73 of file filtask.hxx.

Referenced by info_c().

◆ XPropertySetInfo_impl

friend class XPropertySetInfo_impl
friend

Definition at line 71 of file filtask.hxx.

Referenced by info_p().

◆ XResultSet_impl

friend class XResultSet_impl
friend

Definition at line 72 of file filtask.hxx.

Referenced by ls().

Member Data Documentation

◆ FileContentType

constexpr OUStringLiteral fileaccess::TaskManager::FileContentType
staticconstexpr
Initial value:
=
u"application/vnd.sun.staroffice.fsys-file"
float u

Definition at line 629 of file filtask.hxx.

Referenced by fileaccess::BaseContent::createNewContent(), fileaccess::BaseContent::getContentType(), fileaccess::BaseContent::getPropertyValues(), and queryCreatableContentsInfo().

◆ FolderContentType

constexpr OUStringLiteral fileaccess::TaskManager::FolderContentType
staticconstexpr
Initial value:
=
u"application/vnd.sun.staroffice.fsys-folder"

Definition at line 627 of file filtask.hxx.

Referenced by fileaccess::BaseContent::createNewContent(), fileaccess::BaseContent::getContentType(), fileaccess::BaseContent::getPropertyValues(), and queryCreatableContentsInfo().

◆ m_aContent

ContentMap fileaccess::TaskManager::m_aContent
private

◆ m_aDefaultProperties

PropertySet fileaccess::TaskManager::m_aDefaultProperties
private

Definition at line 635 of file filtask.hxx.

Referenced by associate(), deassociate(), and insertDefaultProperties().

◆ m_aMutex

std::mutex fileaccess::TaskManager::m_aMutex
private

◆ m_aTaskMap

TaskMap fileaccess::TaskManager::m_aTaskMap
private

Definition at line 154 of file filtask.hxx.

Referenced by clearError(), endTask(), handleTask(), installError(), retrieveError(), and startTask().

◆ m_nCommandId

sal_Int32 fileaccess::TaskManager::m_nCommandId
private

Definition at line 153 of file filtask.hxx.

Referenced by getCommandId().

◆ m_pProvider

FileProvider* fileaccess::TaskManager::m_pProvider

◆ m_sCommandInfo

css::uno::Sequence< css::ucb::CommandInfo > fileaccess::TaskManager::m_sCommandInfo
private

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > fileaccess::TaskManager::m_xContext

◆ m_xFileRegistry

css::uno::Reference< css::ucb::XPropertySetRegistry > fileaccess::TaskManager::m_xFileRegistry

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