1*ed2f6d3bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ed2f6d3bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ed2f6d3bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ed2f6d3bSAndrew Rist  * distributed with this work for additional information
6*ed2f6d3bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ed2f6d3bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ed2f6d3bSAndrew Rist  * "License"); you may not use this file except in compliance
9*ed2f6d3bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ed2f6d3bSAndrew Rist  *
11*ed2f6d3bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ed2f6d3bSAndrew Rist  *
13*ed2f6d3bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ed2f6d3bSAndrew Rist  * software distributed under the License is distributed on an
15*ed2f6d3bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ed2f6d3bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ed2f6d3bSAndrew Rist  * specific language governing permissions and limitations
18*ed2f6d3bSAndrew Rist  * under the License.
19*ed2f6d3bSAndrew Rist  *
20*ed2f6d3bSAndrew Rist  *************************************************************/
21*ed2f6d3bSAndrew Rist 
22*ed2f6d3bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _CMDMAILMSG_HXX_
25cdf0e10cSrcweir #define _CMDMAILMSG_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
28cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp>
29cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_
32cdf0e10cSrcweir #include <com/sun/star/system/XSimpleMailMessage.hpp>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
35cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir //----------------------------------------------------------
38cdf0e10cSrcweir // class declaration
39cdf0e10cSrcweir //----------------------------------------------------------
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class CmdMailMsg :
42cdf0e10cSrcweir 	public  cppu::WeakImplHelper2<
43cdf0e10cSrcweir         ::com::sun::star::system::XSimpleMailMessage,
44cdf0e10cSrcweir         ::com::sun::star::container::XNameAccess >
45cdf0e10cSrcweir {
46cdf0e10cSrcweir     ::rtl::OUString                                   m_aRecipient;
47cdf0e10cSrcweir     ::rtl::OUString                                   m_aOriginator;
48cdf0e10cSrcweir     ::rtl::OUString                                   m_aSubject;
49cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< rtl::OUString >  m_CcRecipients;
50cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< rtl::OUString >  m_BccRecipients;
51cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< rtl::OUString >  m_Attachments;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir     ::osl::Mutex m_aMutex;
54cdf0e10cSrcweir 
55cdf0e10cSrcweir public:
56cdf0e10cSrcweir 
57cdf0e10cSrcweir     CmdMailMsg() {};
58cdf0e10cSrcweir 
59cdf0e10cSrcweir     //------------------------------------------------
60cdf0e10cSrcweir     // XSimpleMailMessage
61cdf0e10cSrcweir     //------------------------------------------------
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     virtual void SAL_CALL setRecipient( const ::rtl::OUString& aRecipient )
64cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getRecipient(  )
67cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     virtual void SAL_CALL setCcRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCcRecipient )
70cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCcRecipient(  )
73cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     virtual void SAL_CALL setBccRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aBccRecipient )
76cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getBccRecipient(  )
79cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     virtual void SAL_CALL setOriginator( const ::rtl::OUString& aOriginator )
82cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getOriginator(  )
85cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     virtual void SAL_CALL setSubject( const ::rtl::OUString& aSubject )
88cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
89cdf0e10cSrcweir 
90cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getSubject(  )
91cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     virtual void SAL_CALL setAttachement( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aAttachement )
94cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAttachement(  )
97cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
98cdf0e10cSrcweir 
99cdf0e10cSrcweir    	//------------------------------------------------
100cdf0e10cSrcweir 	// XNameAccess
101cdf0e10cSrcweir 	//------------------------------------------------
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
104cdf0e10cSrcweir         throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
105cdf0e10cSrcweir 
106cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames(  )
107cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException) ;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
110cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
111cdf0e10cSrcweir 
112cdf0e10cSrcweir    	//------------------------------------------------
113cdf0e10cSrcweir 	// XElementAccess
114cdf0e10cSrcweir 	//------------------------------------------------
115cdf0e10cSrcweir 
116cdf0e10cSrcweir     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  )
117cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
118cdf0e10cSrcweir 
119cdf0e10cSrcweir     virtual sal_Bool SAL_CALL hasElements(  )
120cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
121cdf0e10cSrcweir 
122cdf0e10cSrcweir };
123cdf0e10cSrcweir 
124cdf0e10cSrcweir #endif
125