LibreOffice Module framework (master) 1
|
protocol handler for "mailto:" URLs @descr It's a special dispatch object which is used registered for "mailto:*" URLs and will be automatically used from the framework dispatch mechanism if such URL occurred. More...
#include <mailtodispatcher.hxx>
Public Member Functions | |
MailToDispatcher (css::uno::Reference< css::uno::XComponentContext > xContext) | |
standard ctor @descr This initializes a new instance of this class with needed information for work. More... | |
virtual | ~MailToDispatcher () override |
standard dtor More... | |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &sServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL | queryDispatch (const css::util::URL &aURL, const OUString &sTarget, sal_Int32 nFlags) override |
decide if this dispatch implementation can be used for requested URL or not @descr A protocol handler is registered for a URL pattern inside configuration and will be asked by the generic dispatch mechanism inside framework, if he can handle this special URL which match his registration. More... | |
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL | queryDispatches (const css::uno::Sequence< css::frame::DispatchDescriptor > &lDescriptor) override |
do the same like dispatch() but for multiple requests at the same time More... | |
virtual void SAL_CALL | dispatchWithNotification (const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatchResultListener > &xListener) override |
dispatch with guaranteed notifications about success @descr We use threadsafe internal method to do so. More... | |
virtual void SAL_CALL | dispatch (const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override |
dispatch URL with arguments @descr We use threadsafe internal method to do so. More... | |
virtual void SAL_CALL | addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override |
add/remove listener for state events @descr Because we use an external process to forward such mail URLs, and this process doesn't return any notifications about success or failed state - we don't support such status listener. More... | |
virtual void SAL_CALL | removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override |
Private Member Functions | |
bool | implts_dispatch (const css::util::URL &aURL) |
threadsafe helper for dispatch calls @descr We support two interfaces for the same process - dispatch URLs. More... | |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
reference to global uno service manager which had created us More... | |
protocol handler for "mailto:" URLs @descr It's a special dispatch object which is used registered for "mailto:*" URLs and will be automatically used from the framework dispatch mechanism if such URL occurred.
@base OWeakObject provides XWeak and ref count mechanism
@devstatus ready to use
Definition at line 45 of file mailtodispatcher.hxx.
framework::MailToDispatcher::MailToDispatcher | ( | css::uno::Reference< css::uno::XComponentContext > | xContext | ) |
standard ctor @descr This initializes a new instance of this class with needed information for work.
rxContext | reference to uno servicemanager for creation of new services |
Definition at line 58 of file mailtodispatcher.cxx.
|
overridevirtual |
standard dtor
Definition at line 66 of file mailtodispatcher.cxx.
|
overridevirtual |
add/remove listener for state events @descr Because we use an external process to forward such mail URLs, and this process doesn't return any notifications about success or failed state - we don't support such status listener.
We have no status to send.
xListener | reference to a valid listener for state events |
aURL | URL about listener will be informed, if something occurred |
Definition at line 212 of file mailtodispatcher.cxx.
|
overridevirtual |
dispatch URL with arguments @descr We use threadsafe internal method to do so.
It returns a state value - but we ignore it. Because we don't support status listener notifications here. Status events are not guaranteed - and we call another service internally which doesn't return any notifications too.
aURL | mail URL which should be executed |
lArguments | list of optional arguments for this mail request |
Definition at line 118 of file mailtodispatcher.cxx.
References aURL, and implts_dispatch().
|
overridevirtual |
dispatch with guaranteed notifications about success @descr We use threadsafe internal method to do so.
Return state of this function will be used for notification if an optional listener is given.
aURL | mail URL which should be executed |
lArguments | list of optional arguments for this mail request |
xListener | reference to a valid listener for state events |
Definition at line 140 of file mailtodispatcher.cxx.
References aEvent, aURL, and implts_dispatch().
|
overridevirtual |
Definition at line 35 of file mailtodispatcher.cxx.
|
overridevirtual |
Definition at line 45 of file mailtodispatcher.cxx.
References framework::SERVICENAME_PROTOCOLHANDLER.
|
private |
threadsafe helper for dispatch calls @descr We support two interfaces for the same process - dispatch URLs.
css::uno::RuntimeException |
That the reason for this internal function. It implements the real dispatch operation and returns a state value which inform caller about success. He can notify listener then by using this return value.
aURL | mail URL which should be executed |
Definition at line 177 of file mailtodispatcher.cxx.
References aURL, and m_xContext.
Referenced by dispatch(), and dispatchWithNotification().
|
overridevirtual |
decide if this dispatch implementation can be used for requested URL or not @descr A protocol handler is registered for a URL pattern inside configuration and will be asked by the generic dispatch mechanism inside framework, if he can handle this special URL which match his registration.
He can agree by returning of a valid dispatch instance or disagree by returning <NULL>. We don't create new dispatch instances here really - we return THIS as result to handle it at the same implementation.
Definition at line 79 of file mailtodispatcher.cxx.
References aURL.
Referenced by queryDispatches().
|
overridevirtual |
do the same like dispatch() but for multiple requests at the same time
Definition at line 92 of file mailtodispatcher.cxx.
References i, nCount, and queryDispatch().
|
overridevirtual |
Definition at line 218 of file mailtodispatcher.cxx.
|
overridevirtual |
Definition at line 40 of file mailtodispatcher.cxx.
References sServiceName, and cppu::supportsService().
|
private |
reference to global uno service manager which had created us
Definition at line 54 of file mailtodispatcher.hxx.
Referenced by implts_dispatch().