1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SERVER_HXX
28 #define _SERVER_HXX
29 
30 /*#include <vos/thread.hxx>
31 #ifndef _STD_NO_NAMESPACE
32 namespace vos
33 {
34 #endif
35 	class OAcceptorSocket;
36 #ifndef _STD_NO_NAMESPACE
37 }
38 #endif
39 */
40 
41 #include "editwin.hxx"
42 #include <automation/communi.hxx>
43 
44 #define TT_PORT_NOT_INITIALIZED		sal_uLong(0xFFFFFFFF)	// Eigentlich ja noch mehr, aber soll mal reichen
45 #define TT_NO_PORT_DEFINED			0
46 
47 class RemoteControlCommunicationManager : public CommunicationManagerServerViaSocket
48 {
49 #if OSL_DEBUG_LEVEL > 1
50 	EditWindow     *m_pDbgWin;
51 #endif
52 	String aOriginalWinCaption;
53 	String aAdditionalWinCaption;
54 	sal_Bool bIsPortValid;
55 	DECL_LINK( SetWinCaption, Timer* = NULL);
56 	Timer* pTimer;
57 	virtual void InfoMsg( InfoString aMsg );
58 	static sal_uLong nPortIs;
59 	static sal_Bool bQuiet;
60 
61 public:
62 #if OSL_DEBUG_LEVEL > 1
63 	RemoteControlCommunicationManager( EditWindow * pDbgWin );
64 #else
65 	RemoteControlCommunicationManager();
66 #endif
67 	~RemoteControlCommunicationManager();
68 
69 	virtual void ConnectionOpened( CommunicationLink* pCL );
70 	virtual void ConnectionClosed( CommunicationLink* pCL );
71 
72 	static sal_uLong GetPort();
73 	static sal_uInt16 nComm;
74 
75 #if OSL_DEBUG_LEVEL > 1
76 //	virtual void DataReceived( CommunicationLink* pCL );
77 #endif
78 
79 };
80 
81 #endif
82