1408a4873SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4408a4873SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5408a4873SAndrew Rist * distributed with this work for additional information
6408a4873SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the
8408a4873SAndrew Rist * "License"); you may not use this file except in compliance
9408a4873SAndrew Rist * with the License.  You may obtain a copy of the License at
10408a4873SAndrew Rist *
11408a4873SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12408a4873SAndrew Rist *
13408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing,
14408a4873SAndrew Rist * software distributed under the License is distributed on an
15408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16408a4873SAndrew Rist * KIND, either express or implied.  See the License for the
17408a4873SAndrew Rist * specific language governing permissions and limitations
18408a4873SAndrew Rist * under the License.
19408a4873SAndrew Rist *
20408a4873SAndrew Rist *************************************************************/
21408a4873SAndrew Rist
22408a4873SAndrew Rist
23cdf0e10cSrcweir#ifndef _COM_SUN_STAR_CONNECTION_XACCEPTOR_IDL_
24cdf0e10cSrcweir#define _COM_SUN_STAR_CONNECTION_XACCEPTOR_IDL_
25cdf0e10cSrcweir
26cdf0e10cSrcweir#include <com/sun/star/connection/ConnectionSetupException.idl>
27cdf0e10cSrcweir#include <com/sun/star/connection/AlreadyAcceptingException.idl>
28cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
29cdf0e10cSrcweir#include <com/sun/star/connection/XConnection.idl>
30cdf0e10cSrcweir
31cdf0e10cSrcweir
32cdf0e10cSrcweirmodule com {  module sun {  module star {  module connection {
33cdf0e10cSrcweir
34cdf0e10cSrcweir/** allows to passively accept connection attempts from other processes.
35cdf0e10cSrcweir
36cdf0e10cSrcweir	<p>
37cdf0e10cSrcweir	This is the counterpart to the XConnector interface.
38cdf0e10cSrcweir */
39cdf0e10cSrcweirpublished interface XAcceptor: com::sun::star::uno::XInterface
40cdf0e10cSrcweir{
41cdf0e10cSrcweir	// DocMerge from xml: method com::sun::star::connection::XAcceptor::accept
42cdf0e10cSrcweir	/** accepts an interprocess connection. Waits until someone connects to the resource.
43cdf0e10cSrcweir	    <p>
44cdf0e10cSrcweir        After a successful return, the method may be called again to accept
45cdf0e10cSrcweir	    further connections, but the parameter string MUST be left unchanged.
46cdf0e10cSrcweir
47cdf0e10cSrcweir
48cdf0e10cSrcweir	   @param sConnectionDescription
49cdf0e10cSrcweir				contains the kind of the connection plus a
50*86e1cf34SPedro Giffuni		      comma separated list of attributes,
51cdf0e10cSrcweir			   e.g., <em>socket,host=localhost,port=2345</em> for a tcpip connection.
52cdf0e10cSrcweir
53cdf0e10cSrcweir	   @return null reference,
54cdf0e10cSrcweir			stopAccepting was called.
55cdf0e10cSrcweir			Otherwise a valid XConnection reference.
56cdf0e10cSrcweir
57cdf0e10cSrcweir	   @throws AlreadyAcceptingException
58cdf0e10cSrcweir				Only one acceptor-thread per instance allowed.
59cdf0e10cSrcweir	   @throws ConnectionSetupException
60cdf0e10cSrcweir			Problems during setting up the acceptor.
61cdf0e10cSrcweir	      (e.g., Security-reasons, socket already busy, etc.)
62cdf0e10cSrcweir	   @throws com::sun::star::lang::IllegalArgumentException
63cdf0e10cSrcweir	              sConnectionDescription could not be interpreted
64cdf0e10cSrcweir
65cdf0e10cSrcweir	 */
66cdf0e10cSrcweir	XConnection accept( [in] string sConnectionDescription )
67cdf0e10cSrcweir		raises( AlreadyAcceptingException,
68cdf0e10cSrcweir				ConnectionSetupException,
69cdf0e10cSrcweir				com::sun::star::lang::IllegalArgumentException);
70cdf0e10cSrcweir
71cdf0e10cSrcweir
72cdf0e10cSrcweir	/** pushes acceptor out of the accept-call.
73cdf0e10cSrcweir	 */
74cdf0e10cSrcweir	void stopAccepting();
75cdf0e10cSrcweir};
76cdf0e10cSrcweir
77cdf0e10cSrcweir};};};};
78cdf0e10cSrcweir
79cdf0e10cSrcweir#endif
80