xref: /trunk/main/shell/source/cmdmail/cmdmailmsg.cxx (revision 137931e43899a1545869cb6af6ea936d8cee4956)
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 
37 CmdMailMsg::CmdMailMsg()
38 {
39 }
40 
41 void SAL_CALL CmdMailMsg::setBody( const OUString& aBody )
42 {
43     MutexGuard aGuard( m_aMutex );
44     m_aBody = aBody;
45 }
46 
47 OUString SAL_CALL CmdMailMsg::getBody(  )
48 {
49     MutexGuard aGuard( m_aMutex );
50     return m_aBody;
51 }
52 
53 void SAL_CALL CmdMailMsg::setRecipient( const OUString& aRecipient )
54 {
55     MutexGuard aGuard( m_aMutex );
56     m_aRecipient = aRecipient;
57 }
58 
59 OUString SAL_CALL CmdMailMsg::getRecipient(  )
60 {
61     MutexGuard aGuard( m_aMutex );
62     return m_aRecipient;
63 }
64 
65 void SAL_CALL CmdMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipient )
66 {
67     MutexGuard aGuard( m_aMutex );
68     m_CcRecipients = aCcRecipient;
69 }
70 
71 Sequence< OUString > SAL_CALL CmdMailMsg::getCcRecipient(  )
72 {
73     MutexGuard aGuard( m_aMutex );
74     return m_CcRecipients;
75 }
76 
77 void SAL_CALL CmdMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecipient )
78 {
79     MutexGuard aGuard( m_aMutex );
80     m_BccRecipients = aBccRecipient;
81 }
82 
83 Sequence< OUString > SAL_CALL CmdMailMsg::getBccRecipient(  )
84 {
85     MutexGuard aGuard( m_aMutex );
86     return m_BccRecipients;
87 }
88 
89 void SAL_CALL CmdMailMsg::setOriginator( const OUString& aOriginator )
90 {
91     MutexGuard aGuard( m_aMutex );
92     m_aOriginator = aOriginator;
93 }
94 
95 OUString SAL_CALL CmdMailMsg::getOriginator(  )
96 {
97     MutexGuard aGuard( m_aMutex );
98     return m_aOriginator;
99 }
100 
101 void SAL_CALL CmdMailMsg::setSubject( const OUString& aSubject )
102 {
103     MutexGuard aGuard( m_aMutex );
104     m_aSubject = aSubject;
105 }
106 
107 OUString SAL_CALL CmdMailMsg::getSubject(  )
108 {
109     MutexGuard aGuard( m_aMutex );
110     return m_aSubject;
111 }
112 
113 void SAL_CALL CmdMailMsg::setAttachement( const Sequence< OUString >& aAttachment )
114 {
115     MutexGuard aGuard( m_aMutex );
116     m_Attachments = aAttachment;
117 }
118 
119 Sequence< OUString > SAL_CALL CmdMailMsg::getAttachement(  )
120 {
121     MutexGuard aGuard( m_aMutex );
122     return m_Attachments;
123 }
124 
125 }
126