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#ifndef _COM_SUN_STAR_CONNECTION_XACCEPTOR_IDL_
24#define _COM_SUN_STAR_CONNECTION_XACCEPTOR_IDL_
25
26#include <com/sun/star/connection/ConnectionSetupException.idl>
27#include <com/sun/star/connection/AlreadyAcceptingException.idl>
28#include <com/sun/star/lang/IllegalArgumentException.idl>
29#include <com/sun/star/connection/XConnection.idl>
30
31
32module com {  module sun {  module star {  module connection {
33
34/** allows to passively accept connection attempts from other processes.
35
36	<p>
37	This is the counterpart to the XConnector interface.
38 */
39published interface XAcceptor: com::sun::star::uno::XInterface
40{
41	// DocMerge from xml: method com::sun::star::connection::XAcceptor::accept
42	/** accepts an interprocess connection. Waits until someone connects to the resource.
43	    <p>
44        After a successful return, the method may be called again to accept
45	    further connections, but the parameter string MUST be left unchanged.
46
47
48	   @param sConnectionDescription
49				contains the kind of the connection plus a
50		      comma separated list of attributes,
51			   e.g., <em>socket,host=localhost,port=2345</em> for a tcpip connection.
52
53	   @return null reference,
54			stopAccepting was called.
55			Otherwise a valid XConnection reference.
56
57	   @throws AlreadyAcceptingException
58				Only one acceptor-thread per instance allowed.
59	   @throws ConnectionSetupException
60			Problems during setting up the acceptor.
61	      (e.g., Security-reasons, socket already busy, etc.)
62	   @throws com::sun::star::lang::IllegalArgumentException
63	              sConnectionDescription could not be interpreted
64
65	 */
66	XConnection accept( [in] string sConnectionDescription )
67		raises( AlreadyAcceptingException,
68				ConnectionSetupException,
69				com::sun::star::lang::IllegalArgumentException);
70
71
72	/** pushes acceptor out of the accept-call.
73	 */
74	void stopAccepting();
75};
76
77};};};};
78
79#endif
80