Update ooo320-m1
[ooovba.git] / remotebridges / source / bridge / bridge_connection.hxx
blob0087335a853c503bf7f14ab4d0791269ef2c82bc
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: bridge_connection.hxx,v $
10 * $Revision: 1.4 $
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 <osl/interlck.h>
32 #include <bridges/remote/connection.h>
34 #include <com/sun/star/connection/XConnection.hpp>
36 namespace remotebridges_bridge
39 class OConnectionWrapper :
40 public remote_Connection
42 public:
43 OConnectionWrapper( const ::com::sun::star::uno::Reference <
44 ::com::sun::star::connection::XConnection > & );
45 ~OConnectionWrapper();
47 static void SAL_CALL thisAcquire( remote_Connection *);
48 static void SAL_CALL thisRelease( remote_Connection *);
49 static sal_Int32 SAL_CALL thisRead( remote_Connection * , sal_Int8 *pDest , sal_Int32 nSize );
50 static sal_Int32 SAL_CALL thisWrite( remote_Connection * ,
51 const sal_Int8 *pSource ,
52 sal_Int32 nSize );
53 static void SAL_CALL thisFlush( remote_Connection * );
54 static void SAL_CALL thisClose( remote_Connection * );
56 ::com::sun::star::uno::Reference < ::com::sun::star::connection::XConnection > m_r;
57 oslInterlockedCount m_nRef;