1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _CMDMAILMSG_HXX_
29 #define _CMDMAILMSG_HXX_
30 
31 #include <cppuhelper/implbase2.hxx>
32 #include <com/sun/star/lang/IllegalArgumentException.hpp>
33 #include <com/sun/star/container/XNameAccess.hpp>
34 
35 #ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_
36 #include <com/sun/star/system/XSimpleMailMessage.hpp>
37 #endif
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/uno/Reference.hxx>
40 
41 //----------------------------------------------------------
42 // class declaration
43 //----------------------------------------------------------
44 
45 class CmdMailMsg :
46 	public  cppu::WeakImplHelper2<
47         ::com::sun::star::system::XSimpleMailMessage,
48         ::com::sun::star::container::XNameAccess >
49 {
50     ::rtl::OUString                                   m_aRecipient;
51     ::rtl::OUString                                   m_aOriginator;
52     ::rtl::OUString                                   m_aSubject;
53     ::com::sun::star::uno::Sequence< rtl::OUString >  m_CcRecipients;
54     ::com::sun::star::uno::Sequence< rtl::OUString >  m_BccRecipients;
55     ::com::sun::star::uno::Sequence< rtl::OUString >  m_Attachments;
56 
57     ::osl::Mutex m_aMutex;
58 
59 public:
60 
61     CmdMailMsg() {};
62 
63     //------------------------------------------------
64     // XSimpleMailMessage
65     //------------------------------------------------
66 
67     virtual void SAL_CALL setRecipient( const ::rtl::OUString& aRecipient )
68         throw (::com::sun::star::uno::RuntimeException);
69 
70     virtual ::rtl::OUString SAL_CALL getRecipient(  )
71         throw (::com::sun::star::uno::RuntimeException);
72 
73     virtual void SAL_CALL setCcRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCcRecipient )
74         throw (::com::sun::star::uno::RuntimeException);
75 
76     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCcRecipient(  )
77         throw (::com::sun::star::uno::RuntimeException);
78 
79     virtual void SAL_CALL setBccRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aBccRecipient )
80         throw (::com::sun::star::uno::RuntimeException);
81 
82     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getBccRecipient(  )
83         throw (::com::sun::star::uno::RuntimeException);
84 
85     virtual void SAL_CALL setOriginator( const ::rtl::OUString& aOriginator )
86         throw (::com::sun::star::uno::RuntimeException);
87 
88     virtual ::rtl::OUString SAL_CALL getOriginator(  )
89         throw (::com::sun::star::uno::RuntimeException);
90 
91     virtual void SAL_CALL setSubject( const ::rtl::OUString& aSubject )
92         throw (::com::sun::star::uno::RuntimeException);
93 
94     virtual ::rtl::OUString SAL_CALL getSubject(  )
95         throw (::com::sun::star::uno::RuntimeException);
96 
97     virtual void SAL_CALL setAttachement( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aAttachement )
98         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
99 
100     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAttachement(  )
101         throw (::com::sun::star::uno::RuntimeException);
102 
103    	//------------------------------------------------
104 	// XNameAccess
105 	//------------------------------------------------
106 
107     virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
108         throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
109 
110     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames(  )
111         throw (::com::sun::star::uno::RuntimeException) ;
112 
113     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
114         throw (::com::sun::star::uno::RuntimeException);
115 
116    	//------------------------------------------------
117 	// XElementAccess
118 	//------------------------------------------------
119 
120     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  )
121         throw (::com::sun::star::uno::RuntimeException);
122 
123     virtual sal_Bool SAL_CALL hasElements(  )
124         throw (::com::sun::star::uno::RuntimeException);
125 
126 };
127 
128 #endif
129