1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cmdmailmsg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CMDMAILMSG_HXX_
32 #define _CMDMAILMSG_HXX_
34 #include <cppuhelper/implbase2.hxx>
35 #include <com/sun/star/lang/IllegalArgumentException.hpp>
36 #include <com/sun/star/container/XNameAccess.hpp>
38 #ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_
39 #include <com/sun/star/system/XSimpleMailMessage.hpp>
41 #include <com/sun/star/uno/XComponentContext.hpp>
42 #include <com/sun/star/uno/Reference.hxx>
44 //----------------------------------------------------------
46 //----------------------------------------------------------
49 public cppu::WeakImplHelper2
<
50 ::com::sun::star::system::XSimpleMailMessage
,
51 ::com::sun::star::container::XNameAccess
>
53 ::rtl::OUString m_aRecipient
;
54 ::rtl::OUString m_aOriginator
;
55 ::rtl::OUString m_aSubject
;
56 ::com::sun::star::uno::Sequence
< rtl::OUString
> m_CcRecipients
;
57 ::com::sun::star::uno::Sequence
< rtl::OUString
> m_BccRecipients
;
58 ::com::sun::star::uno::Sequence
< rtl::OUString
> m_Attachments
;
60 ::osl::Mutex m_aMutex
;
66 //------------------------------------------------
68 //------------------------------------------------
70 virtual void SAL_CALL
setRecipient( const ::rtl::OUString
& aRecipient
)
71 throw (::com::sun::star::uno::RuntimeException
);
73 virtual ::rtl::OUString SAL_CALL
getRecipient( )
74 throw (::com::sun::star::uno::RuntimeException
);
76 virtual void SAL_CALL
setCcRecipient( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aCcRecipient
)
77 throw (::com::sun::star::uno::RuntimeException
);
79 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getCcRecipient( )
80 throw (::com::sun::star::uno::RuntimeException
);
82 virtual void SAL_CALL
setBccRecipient( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aBccRecipient
)
83 throw (::com::sun::star::uno::RuntimeException
);
85 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getBccRecipient( )
86 throw (::com::sun::star::uno::RuntimeException
);
88 virtual void SAL_CALL
setOriginator( const ::rtl::OUString
& aOriginator
)
89 throw (::com::sun::star::uno::RuntimeException
);
91 virtual ::rtl::OUString SAL_CALL
getOriginator( )
92 throw (::com::sun::star::uno::RuntimeException
);
94 virtual void SAL_CALL
setSubject( const ::rtl::OUString
& aSubject
)
95 throw (::com::sun::star::uno::RuntimeException
);
97 virtual ::rtl::OUString SAL_CALL
getSubject( )
98 throw (::com::sun::star::uno::RuntimeException
);
100 virtual void SAL_CALL
setAttachement( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aAttachement
)
101 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
103 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getAttachement( )
104 throw (::com::sun::star::uno::RuntimeException
);
106 //------------------------------------------------
108 //------------------------------------------------
110 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
111 throw (::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
113 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames( )
114 throw (::com::sun::star::uno::RuntimeException
) ;
116 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
117 throw (::com::sun::star::uno::RuntimeException
);
119 //------------------------------------------------
121 //------------------------------------------------
123 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( )
124 throw (::com::sun::star::uno::RuntimeException
);
126 virtual sal_Bool SAL_CALL
hasElements( )
127 throw (::com::sun::star::uno::RuntimeException
);