1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 // MARKER(update_precomp.py): autogen include statement, do not remove
23 #include "precompiled_shell.hxx"
24 
25 #include "sysmailmsg.hxx"
26 
27 using com::sun::star::lang::IllegalArgumentException;
28 using com::sun::star::uno::RuntimeException;
29 using com::sun::star::uno::Sequence;
30 using rtl::OUString;
31 using osl::MutexGuard;
32 
33 namespace shell
34 {
35 
WinSysMailMsg()36 WinSysMailMsg::WinSysMailMsg( )
37     : WinSysMailMsg_Base()
38 {
39 }
40 
setBody(const OUString & aBody)41 void SAL_CALL WinSysMailMsg::setBody( const OUString& aBody )
42     throw (RuntimeException)
43 {
44     MutexGuard aGuard( m_aMutex );
45     m_aBody = aBody;
46 }
47 
getBody()48 OUString SAL_CALL WinSysMailMsg::getBody(  )
49     throw (RuntimeException)
50 {
51     MutexGuard aGuard( m_aMutex );
52     return m_aBody;
53 }
54 
setRecipient(const OUString & aRecipient)55 void SAL_CALL WinSysMailMsg::setRecipient( const OUString& aRecipient )
56     throw (RuntimeException)
57 {
58     MutexGuard aGuard( m_aMutex );
59     m_aRecipient = aRecipient;
60 }
61 
getRecipient()62 OUString SAL_CALL WinSysMailMsg::getRecipient(  )
63     throw (RuntimeException)
64 {
65     MutexGuard aGuard( m_aMutex );
66     return m_aRecipient;
67 }
68 
setCcRecipient(const Sequence<OUString> & aCcRecipient)69 void SAL_CALL WinSysMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipient )
70     throw (RuntimeException)
71 {
72     MutexGuard aGuard( m_aMutex );
73     m_CcRecipients = aCcRecipient;
74 }
75 
getCcRecipient()76 Sequence< OUString > SAL_CALL WinSysMailMsg::getCcRecipient(  )
77     throw (RuntimeException)
78 {
79     MutexGuard aGuard( m_aMutex );
80     return m_CcRecipients;
81 }
82 
setBccRecipient(const Sequence<OUString> & aBccRecipient)83 void SAL_CALL WinSysMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecipient )
84     throw (RuntimeException)
85 {
86     MutexGuard aGuard( m_aMutex );
87     m_BccRecipients = aBccRecipient;
88 }
89 
getBccRecipient()90 Sequence< OUString > SAL_CALL WinSysMailMsg::getBccRecipient(  )
91     throw (RuntimeException)
92 {
93     MutexGuard aGuard( m_aMutex );
94     return m_BccRecipients;
95 }
96 
setOriginator(const OUString & aOriginator)97 void SAL_CALL WinSysMailMsg::setOriginator( const OUString& aOriginator )
98     throw (RuntimeException)
99 {
100     MutexGuard aGuard( m_aMutex );
101     m_aOriginator = aOriginator;
102 }
103 
getOriginator()104 OUString SAL_CALL WinSysMailMsg::getOriginator(  )
105     throw (RuntimeException)
106 {
107     MutexGuard aGuard( m_aMutex );
108     return m_aOriginator;
109 }
110 
setSubject(const OUString & aSubject)111 void SAL_CALL WinSysMailMsg::setSubject( const OUString& aSubject )
112     throw (RuntimeException)
113 {
114     MutexGuard aGuard( m_aMutex );
115     m_aSubject = aSubject;
116 }
117 
getSubject()118 OUString SAL_CALL WinSysMailMsg::getSubject(  )
119     throw (RuntimeException)
120 {
121     MutexGuard aGuard( m_aMutex );
122     return m_aSubject;
123 }
124 
setAttachement(const Sequence<OUString> & aAttachement)125 void SAL_CALL WinSysMailMsg::setAttachement( const Sequence< OUString >& aAttachement )
126     throw (IllegalArgumentException, RuntimeException)
127 {
128     MutexGuard aGuard( m_aMutex );
129     m_Attachements = aAttachement;
130 }
131 
getAttachement()132 Sequence< OUString > SAL_CALL WinSysMailMsg::getAttachement(  )
133     throw (RuntimeException)
134 {
135     MutexGuard aGuard( m_aMutex );
136     return m_Attachements;
137 }
138 
139 }
140