diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-06-17 14:44:15 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-06-17 14:44:15 +0000 |
commit | 6b9d7a9c2f09e5eb22aeab0887c3be1a00e6fff2 (patch) | |
tree | d9a7dde7baf86106570fadfecb7352700cad054b | |
parent | 9c80ffd6ddd523a444ff3e1a51028e2e765b66de (diff) |
INTEGRATION: CWS defaultmailer (1.3.160); FILE MERGED
2004/06/04 15:09:43 tra 1.3.160.1: #i29558#refactoring of simple mail service, MAPI stuff now called in an own executable
-rw-r--r-- | shell/source/win32/simplemail/smplmailclient.hxx | 81 |
1 files changed, 10 insertions, 71 deletions
diff --git a/shell/source/win32/simplemail/smplmailclient.hxx b/shell/source/win32/simplemail/smplmailclient.hxx index 896b57471af7..03c4fc6b373e 100644 --- a/shell/source/win32/simplemail/smplmailclient.hxx +++ b/shell/source/win32/simplemail/smplmailclient.hxx @@ -2,9 +2,9 @@ * * $RCSfile: smplmailclient.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tra $ $Date: 2001-12-11 08:02:51 $ + * last change: $Author: rt $ $Date: 2004-06-17 15:44:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,18 +62,10 @@ #ifndef _SMPLMAILCLIENT_HXX_ #define _SMPLMAILCLIENT_HXX_ -//_______________________________________________________________________________________________________________________ -// includes of other projects -//_______________________________________________________________________________________________________________________ - #ifndef _CPPUHELPER_COMPBASE1_HXX_ #include <cppuhelper/compbase1.hxx> #endif -#ifndef _OSL_MUTEX_HXX_ -#include <osl/mutex.hxx> -#endif - #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif @@ -82,73 +74,20 @@ #include <com/sun/star/system/XSimpleMailClient.hpp> #endif -#ifndef _SIMPLEMAPI_HXX_ -#include "simplemapi.hxx" -#endif +namespace css = ::com::sun::star; -#ifndef _GENERICBUFFER_HXX_ -#include "genericbuffer.hxx" -#endif - -//---------------------------------------------------------- -// class declaration -//---------------------------------------------------------- - -class CSmplMailClient : - public cppu::WeakImplHelper1< com::sun::star::system::XSimpleMailClient > +class CSmplMailClient : public cppu::WeakImplHelper1<css::system::XSimpleMailClient> { public: - CSmplMailClient( LHANDLE hMapiSession ); - ~CSmplMailClient( ); - - //------------------------------------------------ - // - //------------------------------------------------ - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::system::XSimpleMailMessage > SAL_CALL createSimpleMailMessage( ) - throw (::com::sun::star::uno::RuntimeException); - - //------------------------------------------------ - // - //------------------------------------------------ - - virtual void SAL_CALL sendSimpleMailMessage( const ::com::sun::star::uno::Reference< ::com::sun::star::system::XSimpleMailMessage >& xSimpleMailMessage, sal_Int32 aFlag ) - throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - -private: - void validateParameter( const ::com::sun::star::uno::Reference< ::com::sun::star::system::XSimpleMailMessage >& xSimpleMailMessage, sal_Int32 aFlag ); - void initMapiMessage( const ::com::sun::star::uno::Reference< ::com::sun::star::system::XSimpleMailMessage >& xSimpleMailMessage, MapiMessage& aMapiMessage ); - void initMapiSendMailFlags( sal_Int32 aFlags, FLAGS& aMapiFlags ); - - inline - sal_uInt32 calcNumRecipients( - const ::com::sun::star::uno::Reference< ::com::sun::star::system::XSimpleMailMessage >& xSimpleMailMessage ); - - inline - void initRecipientList( const ::com::sun::star::uno::Sequence< rtl::OUString >& aRecipList, - ULONG ulRecipClass, - size_t& nPos ); - - inline - void initAttachementList( - const ::com::sun::star::uno::Reference< ::com::sun::star::system::XSimpleMailMessage >& xSimpleMailMessage ); - - rtl::OUString getMapiErrorMsg( ULONG ulMapiError ); + virtual css::uno::Reference<css::system::XSimpleMailMessage> SAL_CALL createSimpleMailMessage() + throw (css::uno::RuntimeException); - // fix for #95743 - ULONG SAL_CALL threadExecuteMAPISendMail( CSimpleMapi* pSimpleMapi, LHANDLE lhSession, ULONG ulUIParam, lpMapiMessage lpMessage, FLAGS flFlags ); - static unsigned __stdcall threadProc( void* pParam ); + virtual void SAL_CALL sendSimpleMailMessage(const css::uno::Reference<css::system::XSimpleMailMessage>& xSimpleMailMessage, sal_Int32 aFlag) + throw (css::lang::IllegalArgumentException, css::uno::Exception, css::uno::RuntimeException); private: - LHANDLE m_hMapiSession; - CSimpleMapi* m_pSimpleMapi; - rtl::OString m_Subject; - rtl::OString m_SmtpAddressOriginator; - std::vector< rtl::OString > m_RecipsSmtpAddressList; - std::vector< rtl::OString > m_AttchmtsSysPathList; - MapiRecipDesc m_MsgOriginator; - TGenericBuffer< MapiRecipDesc > m_RecipientList; - TGenericBuffer< MapiFileDesc > m_AttachementList; + void validateParameter(const css::uno::Reference<css::system::XSimpleMailMessage>& xSimpleMailMessage, sal_Int32 aFlag); + void assembleCommandLine(const css::uno::Reference<css::system::XSimpleMailMessage>& xSimpleMailMessage, sal_Int32 aFlag, std::vector<rtl::OUString>& rCommandArgs); }; #endif |