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