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 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_comphelper.hxx"
26 #include <comphelper/interaction.hxx>
27 #include <osl/diagnose.h>
28 
29 //.........................................................................
30 namespace comphelper
31 {
32 //.........................................................................
33 
34 	using namespace ::com::sun::star::uno;
35 	using namespace ::com::sun::star::task;
36 
37     //=========================================================================
38 	//= OInteractionPassword
39 	//=========================================================================
40     //--------------------------------------------------------------------
setPassword(const::rtl::OUString & _Password)41     void SAL_CALL OInteractionPassword::setPassword( const ::rtl::OUString& _Password ) throw (RuntimeException)
42     {
43         m_sPassword = _Password;;
44     }
45 
46     //--------------------------------------------------------------------
getPassword()47     ::rtl::OUString SAL_CALL OInteractionPassword::getPassword(  ) throw (RuntimeException)
48     {
49         return m_sPassword;
50     }
51 
52 	//=========================================================================
53 	//= OInteractionRequest
54 	//=========================================================================
55 	//-------------------------------------------------------------------------
OInteractionRequest(const Any & _rRequestDescription)56 	OInteractionRequest::OInteractionRequest(const Any& _rRequestDescription)
57 		:m_aRequest(_rRequestDescription)
58 	{
59 	}
60 
61 	//-------------------------------------------------------------------------
addContinuation(const Reference<XInteractionContinuation> & _rxContinuation)62 	void OInteractionRequest::addContinuation(const Reference< XInteractionContinuation >& _rxContinuation)
63 	{
64 		OSL_ENSURE(_rxContinuation.is(), "OInteractionRequest::addContinuation: invalid argument!");
65 		if (_rxContinuation.is())
66 		{
67 			sal_Int32 nOldLen = m_aContinuations.getLength();
68 			m_aContinuations.realloc(nOldLen + 1);
69 			m_aContinuations[nOldLen] = _rxContinuation;
70 		}
71 	}
72 
73 	//-------------------------------------------------------------------------
clearContinuations()74 	void OInteractionRequest::clearContinuations()
75 	{
76 		m_aContinuations.realloc(0);
77 	}
78 
79 	//-------------------------------------------------------------------------
getRequest()80 	Any SAL_CALL OInteractionRequest::getRequest(  ) throw(RuntimeException)
81 	{
82 		return m_aRequest;
83 	}
84 
85 	//-------------------------------------------------------------------------
getContinuations()86 	Sequence< Reference< XInteractionContinuation > > SAL_CALL OInteractionRequest::getContinuations(  ) throw(RuntimeException)
87 	{
88 		return m_aContinuations;
89 	}
90 
91 //.........................................................................
92 }	// namespace comphelper
93 //.........................................................................
94 
95 
96