Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef _CMDMAILMSG_HXX_
21 : #define _CMDMAILMSG_HXX_
22 :
23 : #include <cppuhelper/implbase2.hxx>
24 : #include <com/sun/star/lang/IllegalArgumentException.hpp>
25 : #include <com/sun/star/container/XNameAccess.hpp>
26 :
27 : #include <com/sun/star/system/XSimpleMailMessage.hpp>
28 : #include <com/sun/star/uno/XComponentContext.hpp>
29 : #include <com/sun/star/uno/Reference.hxx>
30 :
31 : //----------------------------------------------------------
32 : // class declaration
33 : //----------------------------------------------------------
34 :
35 0 : class CmdMailMsg :
36 : public cppu::WeakImplHelper2<
37 : ::com::sun::star::system::XSimpleMailMessage,
38 : ::com::sun::star::container::XNameAccess >
39 : {
40 : ::rtl::OUString m_aRecipient;
41 : ::rtl::OUString m_aOriginator;
42 : ::rtl::OUString m_aSubject;
43 : ::com::sun::star::uno::Sequence< rtl::OUString > m_CcRecipients;
44 : ::com::sun::star::uno::Sequence< rtl::OUString > m_BccRecipients;
45 : ::com::sun::star::uno::Sequence< rtl::OUString > m_Attachments;
46 :
47 : ::osl::Mutex m_aMutex;
48 :
49 : public:
50 :
51 0 : CmdMailMsg() {};
52 :
53 : //------------------------------------------------
54 : // XSimpleMailMessage
55 : //------------------------------------------------
56 :
57 : virtual void SAL_CALL setRecipient( const ::rtl::OUString& aRecipient )
58 : throw (::com::sun::star::uno::RuntimeException);
59 :
60 : virtual ::rtl::OUString SAL_CALL getRecipient( )
61 : throw (::com::sun::star::uno::RuntimeException);
62 :
63 : virtual void SAL_CALL setCcRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCcRecipient )
64 : throw (::com::sun::star::uno::RuntimeException);
65 :
66 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCcRecipient( )
67 : throw (::com::sun::star::uno::RuntimeException);
68 :
69 : virtual void SAL_CALL setBccRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aBccRecipient )
70 : throw (::com::sun::star::uno::RuntimeException);
71 :
72 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getBccRecipient( )
73 : throw (::com::sun::star::uno::RuntimeException);
74 :
75 : virtual void SAL_CALL setOriginator( const ::rtl::OUString& aOriginator )
76 : throw (::com::sun::star::uno::RuntimeException);
77 :
78 : virtual ::rtl::OUString SAL_CALL getOriginator( )
79 : throw (::com::sun::star::uno::RuntimeException);
80 :
81 : virtual void SAL_CALL setSubject( const ::rtl::OUString& aSubject )
82 : throw (::com::sun::star::uno::RuntimeException);
83 :
84 : virtual ::rtl::OUString SAL_CALL getSubject( )
85 : throw (::com::sun::star::uno::RuntimeException);
86 :
87 : virtual void SAL_CALL setAttachement( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aAttachement )
88 : throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
89 :
90 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAttachement( )
91 : throw (::com::sun::star::uno::RuntimeException);
92 :
93 : //------------------------------------------------
94 : // XNameAccess
95 : //------------------------------------------------
96 :
97 : virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
98 : throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
99 :
100 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( )
101 : throw (::com::sun::star::uno::RuntimeException) ;
102 :
103 : virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
104 : throw (::com::sun::star::uno::RuntimeException);
105 :
106 : //------------------------------------------------
107 : // XElementAccess
108 : //------------------------------------------------
109 :
110 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType( )
111 : throw (::com::sun::star::uno::RuntimeException);
112 :
113 : virtual sal_Bool SAL_CALL hasElements( )
114 : throw (::com::sun::star::uno::RuntimeException);
115 :
116 : };
117 :
118 : #endif
119 :
120 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|