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
 
virtual void execute ()=0
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

bool URLOnDenyList (std::u16string_view sRealURL)
 
EnumerationResult enumerateFolderContent ()
 
virtual void execute () override
 

Private Attributes

ContentDatam_rContent
 
::osl::Mutex & m_rContentMutex
 
std::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 void * operator new (std::size_t size)
 
static void operator delete (void *pointer)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator 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 158 of file contentenumeration.hxx.

Member Typedef Documentation

◆ ContentData

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

Definition at line 161 of file contentenumeration.hxx.

Constructor & Destructor Documentation

◆ FileViewContentEnumerator()

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 72 of file contentenumeration.cxx.

References m_rContent.

◆ ~FileViewContentEnumerator()

svt::FileViewContentEnumerator::~FileViewContentEnumerator ( )
overrideprotectedvirtual

Definition at line 85 of file contentenumeration.cxx.

Member Function Documentation

◆ cancel()

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 90 of file contentenumeration.cxx.

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

◆ enumerateFolderContent() [1/2]

EnumerationResult svt::FileViewContentEnumerator::enumerateFolderContent ( )
private

◆ enumerateFolderContent() [2/2]

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 114 of file contentenumeration.cxx.

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

◆ enumerateFolderContentSync()

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

enumerates the content of a given folder synchronously

Definition at line 100 of file contentenumeration.cxx.

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

◆ execute()

void svt::FileViewContentEnumerator::execute ( )
overrideprivatevirtual

Implements salhelper::Thread.

Definition at line 313 of file contentenumeration.cxx.

References enumerateFolderContent().

◆ URLOnDenyList()

bool svt::FileViewContentEnumerator::URLOnDenyList ( std::u16string_view  sRealURL)
private

Definition at line 305 of file contentenumeration.cxx.

References comphelper::findValue(), and m_rDenyList.

Referenced by enumerateFolderContent().

Member Data Documentation

◆ m_aFolder

FolderDescriptor svt::FileViewContentEnumerator::m_aFolder
private

◆ m_aMutex

std::mutex svt::FileViewContentEnumerator::m_aMutex
mutableprivate

◆ m_bCancelled

bool svt::FileViewContentEnumerator::m_bCancelled
private

Definition at line 173 of file contentenumeration.hxx.

Referenced by cancel(), and enumerateFolderContent().

◆ m_pResultHandler

IEnumerationResultHandler* svt::FileViewContentEnumerator::m_pResultHandler
private

◆ m_rContent

ContentData& svt::FileViewContentEnumerator::m_rContent
private

Definition at line 164 of file contentenumeration.hxx.

Referenced by enumerateFolderContent().

◆ m_rContentMutex

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

Definition at line 165 of file contentenumeration.hxx.

Referenced by enumerateFolderContent().

◆ m_rDenyList

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

Definition at line 175 of file contentenumeration.hxx.

Referenced by enumerateFolderContentSync(), and URLOnDenyList().

◆ m_xCommandEnv

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

Definition at line 171 of file contentenumeration.hxx.

Referenced by enumerateFolderContent().


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