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 "cmdmailmsg.hxx"
26 
27 using com::sun::star::lang::IllegalArgumentException;
28 using rtl::OUString;
29 using osl::MutexGuard;
30 
31 using namespace cppu;
32 using namespace com::sun::star::uno;
33 
34 namespace shell
35 {
36 
CmdMailMsg()37 CmdMailMsg::CmdMailMsg()
38 {
39 }
40 
setBody(const OUString & aBody)41 void SAL_CALL CmdMailMsg::setBody( const OUString& aBody )
42     throw (RuntimeException)
43 {
44     MutexGuard aGuard( m_aMutex );
45     m_aBody = aBody;
46 }
47 
getBody()48 OUString SAL_CALL CmdMailMsg::getBody(  )
49     throw (RuntimeException)
50 {
51     MutexGuard aGuard( m_aMutex );
52     return m_aBody;
53 }
54 
setRecipient(const OUString & aRecipient)55 void SAL_CALL CmdMailMsg::setRecipient( const OUString& aRecipient )
56     throw (RuntimeException)
57 {
58     MutexGuard aGuard( m_aMutex );
59     m_aRecipient = aRecipient;
60 }
61 
getRecipient()62 OUString SAL_CALL CmdMailMsg::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 CmdMailMsg::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 CmdMailMsg::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 CmdMailMsg::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 CmdMailMsg::getBccRecipient(  )
91     throw (RuntimeException)
92 {
93     MutexGuard aGuard( m_aMutex );
94     return m_BccRecipients;
95 }
96 
setOriginator(const OUString & aOriginator)97 void SAL_CALL CmdMailMsg::setOriginator( const OUString& aOriginator )
98     throw (RuntimeException)
99 {
100     MutexGuard aGuard( m_aMutex );
101     m_aOriginator = aOriginator;
102 }
103 
getOriginator()104 OUString SAL_CALL CmdMailMsg::getOriginator(  )
105     throw (RuntimeException)
106 {
107     MutexGuard aGuard( m_aMutex );
108     return m_aOriginator;
109 }
110 
setSubject(const OUString & aSubject)111 void SAL_CALL CmdMailMsg::setSubject( const OUString& aSubject )
112     throw (RuntimeException)
113 {
114     MutexGuard aGuard( m_aMutex );
115     m_aSubject = aSubject;
116 }
117 
getSubject()118 OUString SAL_CALL CmdMailMsg::getSubject(  )
119     throw (RuntimeException)
120 {
121     MutexGuard aGuard( m_aMutex );
122     return m_aSubject;
123 }
124 
setAttachement(const Sequence<OUString> & aAttachment)125 void SAL_CALL CmdMailMsg::setAttachement( const Sequence< OUString >& aAttachment )
126     throw (IllegalArgumentException, RuntimeException)
127 {
128     MutexGuard aGuard( m_aMutex );
129     m_Attachments = aAttachment;
130 }
131 
getAttachement()132 Sequence< OUString > SAL_CALL CmdMailMsg::getAttachement(  )
133     throw (RuntimeException)
134 {
135     MutexGuard aGuard( m_aMutex );
136     return m_Attachments;
137 }
138 
139 }
140