LibreOffice Module fpicker (master)  1
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
svt::FileViewContentEnumerator Class Reference

#include <contentenumeration.hxx>

Inheritance diagram for svt::FileViewContentEnumerator:
[legend]
Collaboration diagram for svt::FileViewContentEnumerator:
[legend]

Public Types

typedef ::std::vector< std::unique_ptr< SortingData_Impl > > ContentData
 

Public Member Functions

 FileViewContentEnumerator (const css::uno::Reference< css::ucb::XCommandEnvironment > &_rxCommandEnv, ContentData &_rContentToFill,::osl::Mutex &_rContentMutex)
 constructs an enumerator instance More...
 
void enumerateFolderContent (const FolderDescriptor &_rFolder, IEnumerationResultHandler *_pResultHandler)
 enumerates the content of a given folder More...
 
EnumerationResult enumerateFolderContentSync (const FolderDescriptor &_rFolder, const css::uno::Sequence< OUString > &rDenyList)
 enumerates the content of a given folder synchronously More...
 
void cancel ()
 cancels the running operation. More...
 
- Public Member Functions inherited from salhelper::Thread
 Thread (char const *name)
 
void launch ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Protected Member Functions

virtual ~FileViewContentEnumerator () override
 
- Protected Member Functions inherited from salhelper::Thread
virtual ~Thread () SAL_OVERRIDE
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

bool URLOnDenyList (const OUString &sRealURL)
 
EnumerationResult enumerateFolderContent ()
 
virtual void execute () override
 

Private Attributes

ContentDatam_rContent
 
::osl::Mutex & m_rContentMutex
 
mutable::osl::Mutex m_aMutex
 
FolderDescriptor m_aFolder
 
css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnv
 
IEnumerationResultHandlerm_pResultHandler
 
bool m_bCancelled
 
css::uno::Sequence< OUString > m_rDenyList
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::Thread
static voidoperator new (std::size_t size)
 
static void operator delete (void *pointer)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static voidoperator new (std::size_t nSize)
 
static voidoperator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 153 of file contentenumeration.hxx.

Member Typedef Documentation

typedef ::std::vector< std::unique_ptr<SortingData_Impl> > svt::FileViewContentEnumerator::ContentData

Definition at line 156 of file contentenumeration.hxx.

Constructor & Destructor Documentation

svt::FileViewContentEnumerator::FileViewContentEnumerator ( const css::uno::Reference< css::ucb::XCommandEnvironment > &  _rxCommandEnv,
ContentData _rContentToFill,
::osl::Mutex &  _rContentMutex 
)

constructs an enumerator instance

Parameters
_rContentToFillthe structure which is to be filled with the found content
_rContentMutexthe mutex which protects the access to <arg>_rContentToFill</arg>
_pTranslatoran instance which should be used to translate content titles. May be <NULL>

Definition at line 76 of file contentenumeration.cxx.

References m_rContent, and Sequence.

svt::FileViewContentEnumerator::~FileViewContentEnumerator ( )
overrideprotectedvirtual

Definition at line 90 of file contentenumeration.cxx.

Member Function Documentation

void svt::FileViewContentEnumerator::cancel ( )

cancels the running operation.

Note that "cancel" may mean that the operation is running, but its result is simply disregarded later on.

Definition at line 95 of file contentenumeration.cxx.

References svt::FolderDescriptor::aContent, m_aFolder, m_aMutex, m_bCancelled, m_pResultHandler, and svt::FolderDescriptor::sURL.

void svt::FileViewContentEnumerator::enumerateFolderContent ( const FolderDescriptor _rFolder,
IEnumerationResultHandler _pResultHandler 
)

enumerates the content of a given folder

Parameters
_rFolderthe folder whose content is to be enumerated
_pFiltera filter to apply to the found contents
_pResultHandleran instance which should handle the results of the enumeration

Definition at line 119 of file contentenumeration.cxx.

References svt::FolderDescriptor::aContent, ucbhelper::Content::get(), salhelper::Thread::launch(), m_aFolder, m_aMutex, m_pResultHandler, and svt::FolderDescriptor::sURL.

EnumerationResult svt::FileViewContentEnumerator::enumerateFolderContent ( )
private
EnumerationResult svt::FileViewContentEnumerator::enumerateFolderContentSync ( const FolderDescriptor _rFolder,
const css::uno::Sequence< OUString > &  rDenyList 
)

enumerates the content of a given folder synchronously

Definition at line 105 of file contentenumeration.cxx.

References enumerateFolderContent(), m_aFolder, m_aMutex, m_pResultHandler, and m_rDenyList.

void svt::FileViewContentEnumerator::execute ( )
overrideprivatevirtual

Implements salhelper::Thread.

Definition at line 321 of file contentenumeration.cxx.

References enumerateFolderContent().

bool svt::FileViewContentEnumerator::URLOnDenyList ( const OUString &  sRealURL)
private

Definition at line 313 of file contentenumeration.cxx.

References comphelper::findValue(), and m_rDenyList.

Referenced by enumerateFolderContent().

Member Data Documentation

FolderDescriptor svt::FileViewContentEnumerator::m_aFolder
private
mutable ::osl::Mutex svt::FileViewContentEnumerator::m_aMutex
private
bool svt::FileViewContentEnumerator::m_bCancelled
private

Definition at line 168 of file contentenumeration.hxx.

Referenced by cancel(), and enumerateFolderContent().

IEnumerationResultHandler* svt::FileViewContentEnumerator::m_pResultHandler
private
ContentData& svt::FileViewContentEnumerator::m_rContent
private

Definition at line 159 of file contentenumeration.hxx.

Referenced by enumerateFolderContent().

::osl::Mutex& svt::FileViewContentEnumerator::m_rContentMutex
private

Definition at line 160 of file contentenumeration.hxx.

Referenced by enumerateFolderContent().

css::uno::Sequence< OUString > svt::FileViewContentEnumerator::m_rDenyList
private

Definition at line 170 of file contentenumeration.hxx.

Referenced by enumerateFolderContentSync(), and URLOnDenyList().

css::uno::Reference< css::ucb::XCommandEnvironment > svt::FileViewContentEnumerator::m_xCommandEnv
private

Definition at line 166 of file contentenumeration.hxx.

Referenced by enumerateFolderContent().


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