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

struct  eMyProperty
 
struct  hMyProperty
 
class  MyProperty
 
class  TaskHandling
 
class  UnqPathData
 

Public Types

enum  FileUrlType {
  FileUrlType::Folder = 1,
  FileUrlType::File = -1,
  FileUrlType::Unknown = 0
}
 
typedef std::unordered_set< MyProperty, hMyProperty, eMyPropertyPropertySet
 
typedef std::vector< Notifier * > NotifierList
 
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)
 
static OUString getImplementationName_static ()
 
static css::uno::Sequence< OUString > getSupportedServiceNames_static ()
 

Public Attributes

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

Static Public Attributes

static const OUStringLiteral FolderContentType
 
static const OUStringLiteral FileContentType
 

Private Types

typedef std::unordered_map< sal_Int32, TaskHandlingTaskMap
 

Private Member Functions

std::vector< std::unique_ptr< ContentEventNotifier > > getContentEventListeners (const OUString &aName)
 
std::vector< std::unique_ptr< ContentEventNotifier > > getContentDeletedEventListeners (const OUString &aName)
 
std::vector< std::unique_ptr< ContentEventNotifier > > getContentExchangedEventListeners (const OUString &aOldPrefix, const OUString &aNewPrefix, bool withChildren)
 
std::vector< std::unique_ptr< PropertyChangeNotifier > > getPropertyChangeNotifier (const OUString &aName)
 
std::vector< std::unique_ptr< PropertySetInfoChangeNotifier > > getPropertySetListeners (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 (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< std::unique_ptr< PropertyChangeNotifier >> &listeners, const css::uno::Sequence< css::beans::PropertyChangeEvent > &seqChanged)
 
static void notifyContentExchanged (const std::vector< std::unique_ptr< ContentEventNotifier >> &listeners_vec)
 
static void notifyInsert (const std::vector< std::unique_ptr< ContentEventNotifier >> &listeners, const OUString &aChildName)
 
static void notifyContentDeleted (const std::vector< std::unique_ptr< ContentEventNotifier >> &listeners)
 
static void notifyContentRemoved (const std::vector< std::unique_ptr< ContentEventNotifier >> &listeners, const OUString &aChildName)
 
static void notifyPropertyAdded (const std::vector< std::unique_ptr< PropertySetInfoChangeNotifier >> &listeners, const OUString &aPropertyName)
 
static void notifyPropertyRemoved (const std::vector< std::unique_ptr< 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

osl::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 79 of file filtask.hxx.

Member Typedef Documentation

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

Definition at line 238 of file filtask.hxx.

Definition at line 219 of file filtask.hxx.

Definition at line 218 of file filtask.hxx.

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

Definition at line 159 of file filtask.hxx.

Member Enumeration Documentation

Enumerator
Folder 
File 
Unknown 

Definition at line 427 of file filtask.hxx.

Constructor & Destructor Documentation

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

Definition at line 366 of file filtask.cxx.

Member Function Documentation

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 534 of file filtask.cxx.

References getPropertySetListeners(), load(), m_aContent, m_aDefaultProperties, m_aMutex, notifyPropertyAdded(), and THROW_WHERE.

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

void TaskManager::clearError ( sal_Int32  CommandId)

Clears any error which are set on the commandid.

Definition at line 418 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

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

void TaskManager::commit ( 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 2248 of file filtask.cxx.

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

void TaskManager::copy ( sal_Int32  CommandId,
const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
sal_Int32  NameClash 
)
osl::FileBase::RC TaskManager::copy_recursive ( const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
FileUrlType  TypeToCopy,
bool  testExistence 
)
private

Definition at line 1993 of file filtask.cxx.

References File, Folder, next, and fileaccess::osl_File_copy().

Referenced by copy().

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

Definition at line 2846 of file filtask.cxx.

References m_xFileRegistry.

Referenced by copyPersistentSet().

void TaskManager::deassociate ( const OUString &  UnqPath,
const OUString &  PropertyName 
)
Exceptions
css::beans::UnknownPropertyException
css::beans::NotRemoveableException
css::uno::RuntimeException

Definition at line 573 of file filtask.cxx.

References getPropertySetListeners(), load(), m_aContent, m_aDefaultProperties, m_aMutex, m_xFileRegistry, notifyPropertyRemoved(), and THROW_WHERE.

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

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

Definition at line 507 of file filtask.cxx.

References m_aContent, and m_aMutex.

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

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 387 of file filtask.cxx.

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

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

bool TaskManager::ensuredir ( sal_Int32  CommandId,
const OUString &  aDirectoryName,
sal_Int32  errorCode 
)
private
void TaskManager::erasePersistentSet ( const OUString &  aUnqPath,
bool  withChildren = false 
)
private

Definition at line 2808 of file filtask.cxx.

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

Referenced by move(), and remove().

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

Definition at line 2788 of file filtask.cxx.

References m_aContent, m_aMutex, and m_xFileRegistry.

Referenced by erasePersistentSet().

sal_Int32 TaskManager::getCommandId ( )

Definition at line 453 of file filtask.cxx.

References m_aMutex, and m_nCommandId.

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

Definition at line 2568 of file filtask.cxx.

References m_aContent, and m_aMutex.

Referenced by remove().

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

Definition at line 2546 of file filtask.cxx.

References m_aContent, and m_aMutex.

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

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

Definition at line 2659 of file filtask.cxx.

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

Referenced by move().

OUString TaskManager::getImplementationName_static ( )
static
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 2151 of file filtask.cxx.

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

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

Definition at line 2752 of file filtask.cxx.

References m_aContent, and m_aMutex.

Referenced by setv().

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

Definition at line 2617 of file filtask.cxx.

References m_aContent, and m_aMutex.

Referenced by associate(), and deassociate().

void TaskManager::getScheme ( OUString &  Scheme)
static
uno::Sequence< OUString > TaskManager::getSupportedServiceNames_static ( )
static
bool TaskManager::getUnqFromUrl ( const OUString &  Url,
OUString &  Unq 
)
static
bool TaskManager::getUrlFromUnq ( const OUString &  Unq,
OUString &  Url 
)
static
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().

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
void TaskManager::handleTask ( sal_Int32  CommandId,
const css::uno::Reference< css::task::XInteractionRequest > &  request 
)

Handles an interactionrequest.

Definition at line 460 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

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

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

Info methods.

Definition at line 809 of file filtask.cxx.

References XCommandInfo_impl.

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

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

Definition at line 1929 of file filtask.cxx.

References load(), m_aContent, m_aDefaultProperties, and m_aMutex.

Referenced by commit(), and fileaccess::BaseContent::insert().

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 441 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

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

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 2194 of file filtask.cxx.

References m_xFileRegistry.

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

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 778 of file filtask.cxx.

References installError(), TASKHANDLER_NO_ERROR, and XResultSet_impl.

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

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 1679 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().

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 1739 of file filtask.cxx.

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

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

void TaskManager::move ( sal_Int32  CommandId,
const OUString &  srcUnqPath,
const OUString &  dstUnqPath,
const sal_Int32  NameClash 
)
void TaskManager::notifyContentDeleted ( const std::vector< std::unique_ptr< ContentEventNotifier >> &  listeners)
staticprivate

Definition at line 2597 of file filtask.cxx.

Referenced by remove().

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

Definition at line 2741 of file filtask.cxx.

Referenced by move().

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

Definition at line 2606 of file filtask.cxx.

Referenced by move().

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

Definition at line 2588 of file filtask.cxx.

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

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

Definition at line 2637 of file filtask.cxx.

Referenced by associate().

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

Definition at line 2772 of file filtask.cxx.

Referenced by setv().

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

Definition at line 2647 of file filtask.cxx.

Referenced by deassociate().

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 715 of file filtask.cxx.

References installError(), and TASKHANDLER_NO_ERROR.

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

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 747 of file filtask.cxx.

References installError(), and TASKHANDLER_NO_ERROR.

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

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 626 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().

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

Definition at line 2908 of file filtask.cxx.

References FileContentType, and FolderContentType.

Referenced by commit(), and fileaccess::BaseContent::queryCreatableContentsInfo().

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 488 of file filtask.cxx.

References m_aContent, and m_aMutex.

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

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

Definition at line 427 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

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

Sets the values of the properties belonging to fileURL aUnqPath.

Definition at line 842 of file filtask.cxx.

References err, getPropertyChangeNotifier(), i, comphelper::InitAnyPropertySequence(), IsHidden(), IsReadOnly(), load(), m_aContent, m_aMutex, Name, notifyPropertyChanges(), THROW_WHERE, value, Value, and uno::Any::Value.

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

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

Definition at line 372 of file filtask.cxx.

References m_aMutex, and m_aTaskMap.

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

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

Friends And Related Function Documentation

friend class XCommandInfo_impl
friend

Definition at line 83 of file filtask.hxx.

Referenced by info_c().

friend class XPropertySetInfo_impl
friend

Definition at line 81 of file filtask.hxx.

Referenced by info_p().

friend class XResultSet_impl
friend

Definition at line 82 of file filtask.hxx.

Referenced by ls().

Member Data Documentation

const OUStringLiteral TaskManager::FileContentType
static
const OUStringLiteral TaskManager::FolderContentType
static
ContentMap fileaccess::TaskManager::m_aContent
private
PropertySet fileaccess::TaskManager::m_aDefaultProperties
private

Definition at line 651 of file filtask.hxx.

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

osl::Mutex fileaccess::TaskManager::m_aMutex
private
TaskMap fileaccess::TaskManager::m_aTaskMap
private

Definition at line 164 of file filtask.hxx.

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

sal_Int32 fileaccess::TaskManager::m_nCommandId
private

Definition at line 163 of file filtask.hxx.

Referenced by getCommandId().

FileProvider* fileaccess::TaskManager::m_pProvider
css::uno::Sequence< css::ucb::CommandInfo > fileaccess::TaskManager::m_sCommandInfo
private
css::uno::Reference< css::uno::XComponentContext > fileaccess::TaskManager::m_xContext
css::uno::Reference< css::ucb::XPropertySetRegistry > fileaccess::TaskManager::m_xFileRegistry

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