LibreOffice Module ucb (master) 1
|
#include <filtask.hxx>
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, MyPropertyLess > | PropertySet |
typedef std::unordered_map< OUString, UnqPathData > | ContentMap |
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 | |
FileProvider * | m_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, TaskHandling > | TaskMap |
Private Member Functions | |
void | insertDefaultProperties (std::unique_lock< std::mutex > &rGuard, const OUString &aUnqPath) |
std::vector< ContentEventNotifier > | getContentEventListeners (const OUString &aName) |
std::vector< ContentEventNotifier > | getContentDeletedEventListeners (const OUString &aName) |
std::vector< ContentEventNotifier > | getContentExchangedEventListeners (const OUString &aOldPrefix, const OUString &aNewPrefix, bool withChildren) |
std::vector< PropertyChangeNotifier > | getPropertyChangeNotifier (const OUString &aName) |
std::vector< 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 (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 |
Definition at line 69 of file filtask.hxx.
typedef std::unordered_map< OUString,UnqPathData > fileaccess::TaskManager::ContentMap |
Definition at line 217 of file filtask.hxx.
Definition at line 199 of file filtask.hxx.
|
private |
Definition at line 149 of file filtask.hxx.
|
strong |
Enumerator | |
---|---|
Folder | |
File | |
Unknown |
Definition at line 406 of file filtask.hxx.
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 | ( | ) |
Definition at line 361 of file filtask.cxx.
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
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().
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().
|
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.
void TaskManager::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 )
Definition at line 1341 of file filtask.cxx.
References copy_recursive(), copyPersistentSet(), File, Folder, getContentEventListeners(), fileaccess::getParentName(), getType(), installError(), notifyInsert(), nPos, remove(), TASKHANDLING_KEEPERROR_FOR_COPY, TASKHANDLING_NAMECLASH_FOR_COPY, TASKHANDLING_NAMECLASHMOVE_FOR_COPY, TASKHANDLING_NAMECLASHSUPPORT_FOR_COPY, TASKHANDLING_OVERWRITE_FOR_COPY, TASKHANDLING_RENAME_FOR_COPY, TASKHANDLING_RENAMEMOVE_FOR_COPY, TASKHANDLING_TRANSFER_BY_COPY_SOURCESTAT, and type.
Referenced by fileaccess::BaseContent::transfer().
|
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().
|
private |
Definition at line 2880 of file filtask.cxx.
References copyPersistentSetWithoutChildren(), fileaccess::isChild(), m_xFileRegistry, and fileaccess::newName().
|
private |
Definition at line 2850 of file filtask.cxx.
References m_xFileRegistry.
Referenced by copyPersistentSet().
void TaskManager::deassociate | ( | const OUString & | UnqPath, |
const OUString & | PropertyName | ||
) |
css::beans::UnknownPropertyException | |
css::beans::NotRemoveableException | |
css::uno::RuntimeException |
Definition at line 568 of file filtask.cxx.
References ContentType(), 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, m_xFileRegistry, notifyPropertyRemoved(), and THROW_WHERE.
Referenced by fileaccess::BaseContent::removeProperty().
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().
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().
|
private |
Definition at line 2068 of file filtask.cxx.
References ensuredir(), getContentEventListeners(), fileaccess::getParentName(), installError(), notifyInsert(), OUStringToOString(), and sal_True.
Referenced by ensuredir(), mkdir(), and write().
|
private |
Definition at line 2812 of file filtask.cxx.
References erasePersistentSetWithoutChildren(), fileaccess::isChild(), and m_xFileRegistry.
|
private |
Definition at line 2792 of file filtask.cxx.
References m_aContent, m_aMutex, and m_xFileRegistry.
Referenced by erasePersistentSet().
sal_Int32 TaskManager::getCommandId | ( | ) |
Definition at line 448 of file filtask.cxx.
References m_aMutex, and m_nCommandId.
Referenced by fileaccess::BaseContent::createCommandIdentifier().
|
private |
Definition at line 2572 of file filtask.cxx.
References aName, m_aContent, and m_aMutex.
Referenced by remove().
|
private |
Definition at line 2550 of file filtask.cxx.
References aName, m_aContent, and m_aMutex.
Referenced by copy(), ensuredir(), mkdir(), mkfil(), and move().
|
private |
Definition at line 2663 of file filtask.cxx.
References count, fileaccess::isChild(), m_aContent, m_aMutex, and fileaccess::newName().
Referenced by move().
|
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.
|
private |
Definition at line 2756 of file filtask.cxx.
References aName, m_aContent, and m_aMutex.
Referenced by setv().
|
private |
Definition at line 2621 of file filtask.cxx.
References aName, m_aContent, and m_aMutex.
Referenced by associate(), and deassociate().
|
static |
Definition at line 2934 of file filtask.cxx.
References Scheme.
Referenced by fileaccess::FileContentIdentifier::FileContentIdentifier().
|
static |
Definition at line 1960 of file filtask.cxx.
Referenced by fileaccess::FileProvider::compareContentIds(), fileaccess::FileProvider::queryContent(), and fileaccess::BaseContent::transfer().
|
static |
Definition at line 1981 of file filtask.cxx.
Referenced by fileaccess::FileContentIdentifier::FileContentIdentifier(), and fileaccess::BaseContent::getParent().
|
private |
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().
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().
uno::Reference< XCommandInfo > TaskManager::info_c | ( | ) |
Info methods.
Definition at line 805 of file filtask.cxx.
References XCommandInfo_impl.
Referenced by fileaccess::BaseContent::getCommandInfo().
uno::Reference< beans::XPropertySetInfo > TaskManager::info_p | ( | const OUString & | aUnqPath | ) |
Definition at line 819 of file filtask.cxx.
References m_aMutex, and XPropertySetInfo_impl.
Referenced by fileaccess::BaseContent::addPropertiesChangeListener(), and fileaccess::BaseContent::getPropertySetInfo().
void TaskManager::insertDefaultProperties | ( | const OUString & | aUnqPath | ) |
Definition at line 1925 of file filtask.cxx.
References insertDefaultProperties(), and m_aMutex.
Referenced by commit(), fileaccess::BaseContent::insert(), and insertDefaultProperties().
|
private |
Definition at line 1931 of file filtask.cxx.
References ContentType(), load(), m_aContent, m_aDefaultProperties, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
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().
|
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().
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().
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().
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().
void TaskManager::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 )
Definition at line 1133 of file filtask.cxx.
References copyPersistentSet(), erasePersistentSet(), getContentEventListeners(), getContentExchangedEventListeners(), fileaccess::getParentName(), installError(), notifyContentExchanged(), notifyContentRemoved(), notifyInsert(), nPos, fileaccess::osl_File_move(), TASKHANDLING_KEEPERROR_FOR_MOVE, TASKHANDLING_NAMECLASH_FOR_MOVE, TASKHANDLING_NAMECLASHMOVE_FOR_MOVE, TASKHANDLING_NAMECLASHSUPPORT_FOR_MOVE, TASKHANDLING_OVERWRITE_FOR_MOVE, TASKHANDLING_RENAME_FOR_MOVE, TASKHANDLING_RENAMEMOVE_FOR_MOVE, TASKHANDLING_TRANSFER_BY_MOVE_SOURCE, and TASKHANDLING_TRANSFER_BY_MOVE_SOURCESTAT.
Referenced by fileaccess::BaseContent::setPropertyValues(), and fileaccess::BaseContent::transfer().
|
staticprivate |
Definition at line 2601 of file filtask.cxx.
Referenced by remove().
|
staticprivate |
Definition at line 2745 of file filtask.cxx.
Referenced by move().
|
staticprivate |
Definition at line 2610 of file filtask.cxx.
Referenced by move().
|
staticprivate |
Definition at line 2592 of file filtask.cxx.
Referenced by copy(), ensuredir(), mkdir(), mkfil(), and move().
|
staticprivate |
Definition at line 2641 of file filtask.cxx.
Referenced by associate().
|
staticprivate |
Definition at line 2776 of file filtask.cxx.
Referenced by setv().
|
staticprivate |
Definition at line 2651 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 711 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 743 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 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().
|
static |
Definition at line 2912 of file filtask.cxx.
References FileContentType, FolderContentType, cppu::UnoType< typename T >::get(), and props.
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 483 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 |
||
) |
Deletes the content belonging to fileURL aUnqPath( recursively in case of directory )
Definition at line 1513 of file filtask.cxx.
References erasePersistentSet(), File, Folder, getContentDeletedEventListeners(), installError(), name, notifyContentDeleted(), remove(), TASKHANDLER_NO_ERROR, TASKHANDLING_DELETEDIRECTORY_FOR_REMOVE, TASKHANDLING_DELETEFILE_FOR_REMOVE, TASKHANDLING_DIRECTORYEXHAUSTED_FOR_REMOVE, TASKHANDLING_FILETYPE_FOR_REMOVE, TASKHANDLING_NOSUCHFILEORDIR_FOR_REMOVE, TASKHANDLING_OPENDIRECTORY_FOR_REMOVE, TASKHANDLING_VALIDFILESTATUS_FOR_REMOVE, TASKHANDLING_VALIDFILESTATUSWHILE_FOR_REMOVE, and Unknown.
Referenced by copy(), fileaccess::BaseContent::deleteContent(), and remove().
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.
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 836 of file filtask.cxx.
References ContentType(), err, getPropertyChangeNotifier(), i, comphelper::InitAnyPropertySequence(), IsHidden(), IsReadOnly(), load(), m_aContent, m_aMutex, Name, nAttributes, notifyPropertyChanges(), THROW_WHERE, value, Value, and values.
Referenced by fileaccess::BaseContent::setPropertyValues().
void TaskManager::startTask | ( | sal_Int32 | CommandId, |
const css::uno::Reference< css::ucb::XCommandEnvironment > & | xCommandEnv | ||
) |
css::ucb::DuplicateCommandIdentifierException |
Definition at line 367 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 | ||
) |
writes to the file with given URL.
The content of aInputStream becomes the content of the file Return:: success of operation
Definition at line 1766 of file filtask.cxx.
References ensuredir(), err, fileaccess::getParentName(), installError(), p, TASKHANDLING_BUFFERSIZEEXCEEDED_FOR_WRITE, TASKHANDLING_ENSUREDIR_FOR_WRITE, TASKHANDLING_FILEIOERROR_FOR_NO_SPACE, TASKHANDLING_FILEIOERROR_FOR_WRITE, TASKHANDLING_FILESIZE_FOR_WRITE, TASKHANDLING_INPUTSTREAM_FOR_WRITE, TASKHANDLING_IOEXCEPTION_FOR_WRITE, TASKHANDLING_NO_OPEN_FILE_FOR_OVERWRITE, TASKHANDLING_NO_OPEN_FILE_FOR_WRITE, TASKHANDLING_NOREPLACE_FOR_WRITE, and TASKHANDLING_NOTCONNECTED_FOR_WRITE.
Referenced by fileaccess::BaseContent::insert(), and mkfil().
|
friend |
Definition at line 73 of file filtask.hxx.
Referenced by info_c().
|
friend |
Definition at line 71 of file filtask.hxx.
Referenced by info_p().
|
friend |
Definition at line 72 of file filtask.hxx.
Referenced by ls().
|
staticconstexpr |
Definition at line 629 of file filtask.hxx.
Referenced by fileaccess::BaseContent::createNewContent(), fileaccess::BaseContent::getContentType(), fileaccess::BaseContent::getPropertyValues(), and queryCreatableContentsInfo().
|
staticconstexpr |
Definition at line 627 of file filtask.hxx.
Referenced by fileaccess::BaseContent::createNewContent(), fileaccess::BaseContent::getContentType(), fileaccess::BaseContent::getPropertyValues(), and queryCreatableContentsInfo().
|
private |
Definition at line 622 of file filtask.hxx.
Referenced by associate(), deassociate(), deregisterNotifier(), erasePersistentSetWithoutChildren(), getContentDeletedEventListeners(), getContentEventListeners(), getContentExchangedEventListeners(), getPropertyChangeNotifier(), getPropertySetListeners(), insertDefaultProperties(), registerNotifier(), setv(), and fileaccess::XPropertySetInfo_impl::XPropertySetInfo_impl().
|
private |
Definition at line 635 of file filtask.hxx.
Referenced by associate(), deassociate(), and insertDefaultProperties().
|
private |
Definition at line 152 of file filtask.hxx.
Referenced by associate(), clearError(), deassociate(), deregisterNotifier(), endTask(), erasePersistentSetWithoutChildren(), getCommandId(), getContentDeletedEventListeners(), getContentEventListeners(), getContentExchangedEventListeners(), getPropertyChangeNotifier(), getPropertySetListeners(), handleTask(), info_p(), insertDefaultProperties(), installError(), registerNotifier(), retrieveError(), setv(), and startTask().
|
private |
Definition at line 154 of file filtask.hxx.
Referenced by clearError(), endTask(), handleTask(), installError(), retrieveError(), and startTask().
|
private |
Definition at line 153 of file filtask.hxx.
Referenced by getCommandId().
FileProvider* fileaccess::TaskManager::m_pProvider |
Definition at line 477 of file filtask.hxx.
Referenced by fileaccess::BaseContent::BaseContent(), fileaccess::BaseContent::getParent(), fileaccess::ContentEventNotifier::notifyChildInserted(), fileaccess::XResultSet_impl::queryContent(), fileaccess::XPropertySetInfo_impl::XPropertySetInfo_impl(), fileaccess::BaseContent::~BaseContent(), and fileaccess::XPropertySetInfo_impl::~XPropertySetInfo_impl().
|
private |
Definition at line 636 of file filtask.hxx.
Referenced by fileaccess::XCommandInfo_impl::getCommandInfoByHandle(), fileaccess::XCommandInfo_impl::getCommandInfoByName(), fileaccess::XCommandInfo_impl::getCommands(), fileaccess::XCommandInfo_impl::hasCommandByHandle(), and fileaccess::XCommandInfo_impl::hasCommandByName().
css::uno::Reference< css::uno::XComponentContext > fileaccess::TaskManager::m_xContext |
Definition at line 478 of file filtask.hxx.
Referenced by fileaccess::XResultSet_impl::connectToCache(), convert(), and fileaccess::XResultSet_impl::getMetaData().
css::uno::Reference< css::ucb::XPropertySetRegistry > fileaccess::TaskManager::m_xFileRegistry |
Definition at line 479 of file filtask.hxx.
Referenced by copyPersistentSet(), copyPersistentSetWithoutChildren(), deassociate(), erasePersistentSet(), erasePersistentSetWithoutChildren(), and load().