Update git submodules
[LibreOffice.git] / udkapi / com / sun / star / bridge / XProtocolProperties.idl
bloba711b400824d3dd10531672959713f361559bb4f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com { module sun { module star { module bridge {
23 /** Bridge internal interface, that allows to change protocol settings of the remote
24 counter part.
26 <p>In general, this interface is implemented by the bridge itself. It must not
27 be called from outside the bridge.</p>
29 <p>INTERNAL INTERFACE, DO NOT USE IT ELSEWHERE!</p>
31 published interface XProtocolProperties : com::sun::star::uno::XInterface
33 /** called to get a list of bridge internal properties. Which properties can be retrieved,
34 is protocol dependent.
36 <p> The properties MUST NOT change between a requestChange and a commit change call.</p>
38 sequence< ProtocolProperty > getProperties( );
40 /** called to initiate a protocol change.
42 <p>This method should always be called in the scope of the local bridge setting object,
43 because the remote counter part may do such a call at the same time
44 (typically at startup time). </p>
46 @param nRandomNumber
47 In case both processes call requestChange at the same time,
48 the caller with the higher nRandomNumber is allowed to call
49 commitChange.
51 @returns
52 1, if the caller may ( and MUST !!!) call commitChange.
53 0, if the caller is not allowed to call commitChange. This can only happen,
54 if the other bridge has called requestChange at the same time and
55 nRandomNumber is smaller than the other bridge's nRandomNumber.
56 The remote counterpart is supposed to call commitChange within a small
57 time span. Please call requestChange() after the remote counterpart has
58 called commitChange().
59 -1 if the nRandomNumber is of the same value as the previously
60 sent requestChange (sent by the remote counterpart). This is a draw :o).
61 Generate a new random number and try again.
63 long requestChange( [in] long nRandomNumber );
65 /** called to commit a protocol change.
67 <p>It is only allowed to call commitChange, if requestChange
68 has been called previously and the return value was true. The new properties are
69 valid after the reply of commitChange has been received.
70 Note, that this is difficult for the callee, because it must marshal the reply
71 with the old settings. </p>
73 <p>All properties not mentioned in the list are unchanged.
74 Note that the bridge must be blocked for other threads,
75 before commitChange is sent and unblocked
76 after the reply has been received. This blocks the bridge.</p>
78 @throws InvalidProtocolChangeException
79 when the remote counterpart could not change at least one of the properties.
80 No property has been changed. requestChange must be called
81 again to initiate a new change of the protocol.
83 void commitChange( [in] sequence< ProtocolProperty > newValues )
84 raises ( com::sun::star::bridge::InvalidProtocolChangeException );
87 };};};};
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */