1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_TEST_OFFICECONNECTION_HXX 25 #define INCLUDED_TEST_OFFICECONNECTION_HXX 26 27 #include "sal/config.h" 28 29 #include "boost/noncopyable.hpp" 30 #include "com/sun/star/uno/Reference.hxx" 31 #include "osl/process.h" 32 #include "test/detail/testdllapi.hxx" 33 34 namespace com { namespace sun { namespace star { namespace uno { 35 class XComponentContext; 36 } } } } 37 38 namespace test { 39 40 // Start up and shut down an OOo instance (details about the OOo instance are 41 // tunneled in via "arg-..." bootstrap variables): 42 class OOO_DLLPUBLIC_TEST OfficeConnection: private boost::noncopyable { 43 public: 44 OfficeConnection(); 45 46 ~OfficeConnection(); 47 48 void setUp(); 49 50 void tearDown(); 51 52 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > 53 getComponentContext() const; 54 55 private: 56 oslProcess process_; 57 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > 58 context_; 59 }; 60 61 } 62 63 #endif 64