1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_IMAILDSPLISTENER_HXX 25 #define INCLUDED_IMAILDSPLISTENER_HXX 26 27 #include "com/sun/star/mail/XMailMessage.hpp" 28 #include <salhelper/refobj.hxx> 29 30 31 class MailDispatcher; 32 33 /** 34 MailDispatcher listener interface. 35 Clients may implement and register instances of the 36 mail dispatcher interface in order to get notifications 37 about the MailDispatcher status. 38 39 @see MailDispatcher 40 */ 41 class IMailDispatcherListener : public ::salhelper::ReferenceObject 42 { 43 public: 44 /** 45 Called when the MailDispatcher is started. 46 */ 47 virtual void started(::rtl::Reference<MailDispatcher> xMailDispatcher) = 0; 48 49 /** 50 Called when the MailDispatcher is stopped. 51 */ 52 virtual void stopped(::rtl::Reference<MailDispatcher> xMailDispatcher) = 0; 53 54 /** 55 Called when there are no more mail messages 56 to deliver. 57 */ 58 virtual void idle(::rtl::Reference<MailDispatcher> xMailDispatcher) = 0; 59 60 /** 61 Called for every mail message that has been 62 successfully delivered. 63 */ 64 virtual void mailDelivered(::rtl::Reference<MailDispatcher> xMailDispatcher, ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> xMailMessage) = 0; 65 66 /** 67 Called for every mail message whose delivery 68 failed. 69 */ 70 virtual void mailDeliveryError(::rtl::Reference<MailDispatcher> xMailDispatcher, ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> xMailMessage, const rtl::OUString& sErrorMessage) = 0; 71 }; 72 73 #endif // INCLUDED_IMAILDISPATCHERLISTENER_HXX 74