20#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_MAILDISPATCHER_HXX
21#define INCLUDED_SW_SOURCE_UIBASE_INC_MAILDISPATCHER_HXX
23#include <com/sun/star/mail/XSmtpService.hpp>
24#include <com/sun/star/mail/XMailMessage.hpp>
25#include <osl/thread.hxx>
26#include <osl/conditn.hxx>
49 using osl::Thread::operator
new;
50 using osl::Thread::operator
delete;
51 using osl::Thread::join;
62 MailDispatcher(css::uno::Reference<css::mail::XSmtpService> xMailService);
78 void enqueueMailMessage(css::uno::Reference<css::mail::XMailMessage>
const& xMailMessage);
83 css::uno::Reference<css::mail::XMailMessage> dequeueMailMessage();
122 using osl::Thread::isRunning;
135 virtual void SAL_CALL
run()
override;
136 virtual void SAL_CALL onTerminated()
override;
138 std::vector<::rtl::Reference<IMailDispatcherListener>> cloneListener();
139 void sendMailMessageNotifyListener(css::uno::Reference<css::mail::XMailMessage>
const& message);
MailDispatcher listener interface.
A MailDispatcher should be used for sending a bunch a mail messages asynchronously.
std::vector<::rtl::Reference< IMailDispatcherListener > > m_aListenerVector
css::uno::Reference< css::mail::XSmtpService > m_xMailserver
::osl::Mutex m_aThreadStatusMutex
::osl::Condition m_aRunCondition
bool isShutdownRequested() const
returns if shutdown has already been called
::osl::Condition m_aWakeupCondition
std::list< css::uno::Reference< css::mail::XMailMessage > > m_aXMessageList
bool m_bShutdownRequested
bool isStarted() const
Check whether the mail dispatcher is started or not.
::osl::Mutex m_aListenerContainerMutex
::osl::Mutex m_aMessageContainerMutex
::rtl::Reference< MailDispatcher > m_xSelfReference
def run(arg=None, arg2=-1)
void addListener(const InterfaceRef &xObject, const css::uno::Reference< css::lang::XEventListener > &xListener)