Update ooo320-m1
[ooovba.git] / bridges / source / remote / urp / urp_writer.hxx
blob4867e8328371b05a0dd0d23ce9b0aec21d6f274e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: urp_writer.hxx,v $
10 * $Revision: 1.7.20.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include <list>
32 #include <osl/conditn.h>
33 #include <osl/mutex.hxx>
35 #include <rtl/ustring.hxx>
37 #include <osl/thread.hxx>
39 #include <com/sun/star/uno/Type.hxx>
41 struct remote_Connection;
43 namespace bridges_urp
45 struct RemoteReleaseCall
47 ::rtl::OUString sOid;
48 ::com::sun::star::uno::Type typeInterface;
51 struct urp_BridgeImpl;
52 class OWriterThread :
53 public ::osl::Thread
55 public:
56 OWriterThread( remote_Connection *pConnection,
57 urp_BridgeImpl *m_pBridgeImpl,
58 uno_Environment *pEnvRemote);
59 ~OWriterThread( );
61 virtual void SAL_CALL run();
63 void touch( sal_Bool bImmediately );
64 void sendEmptyMessage();
66 void abortThread();
68 void SAL_CALL insertReleaseRemoteCall (
69 rtl_uString *pOid,typelib_TypeDescriptionReference *pTypeRef);
70 void SAL_CALL executeReleaseRemoteCalls();
72 private:
73 void write();
74 oslCondition m_oslCondition;
75 sal_Bool m_bAbort;
76 sal_Bool m_bInBlockingWait;
77 sal_Bool m_bEnterBlockingWait;
78 remote_Connection *m_pConnection;
79 urp_BridgeImpl *m_pBridgeImpl;
80 uno_Environment *m_pEnvRemote; // this is held weak only
82 ::osl::Mutex m_releaseCallMutex;
83 ::std::list< struct RemoteReleaseCall > m_lstReleaseCalls;