1be9e621aSdamjan /************************************************************** 2be9e621aSdamjan * 3be9e621aSdamjan * Licensed to the Apache Software Foundation (ASF) under one 4be9e621aSdamjan * or more contributor license agreements. See the NOTICE file 5be9e621aSdamjan * distributed with this work for additional information 6be9e621aSdamjan * regarding copyright ownership. The ASF licenses this file 7be9e621aSdamjan * to you under the Apache License, Version 2.0 (the 8be9e621aSdamjan * "License"); you may not use this file except in compliance 9be9e621aSdamjan * with the License. You may obtain a copy of the License at 10be9e621aSdamjan * 11be9e621aSdamjan * http://www.apache.org/licenses/LICENSE-2.0 12be9e621aSdamjan * 13be9e621aSdamjan * Unless required by applicable law or agreed to in writing, 14be9e621aSdamjan * software distributed under the License is distributed on an 15be9e621aSdamjan * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16be9e621aSdamjan * KIND, either express or implied. See the License for the 17be9e621aSdamjan * specific language governing permissions and limitations 18be9e621aSdamjan * under the License. 19be9e621aSdamjan * 20be9e621aSdamjan *************************************************************/ 21be9e621aSdamjan 22be9e621aSdamjan 23be9e621aSdamjan 24be9e621aSdamjan #include "sal/config.h" 25be9e621aSdamjan 26*19ee18fdSDamjan Jovanovic #include "gtest/gtest.h" 27be9e621aSdamjan #include "osl/process.h" 28be9e621aSdamjan #include "rtl/ustring.h" 29be9e621aSdamjan #include "rtl/ustring.hxx" 30be9e621aSdamjan #include "sal/types.h" 31be9e621aSdamjan #include "test/uniquepipename.hxx" 32be9e621aSdamjan 33be9e621aSdamjan namespace test { 34be9e621aSdamjan uniquePipeName(rtl::OUString const & name)35be9e621aSdamjanrtl::OUString uniquePipeName(rtl::OUString const & name) { 36be9e621aSdamjan oslProcessInfo info; 37be9e621aSdamjan info.Size = sizeof info; 38*19ee18fdSDamjan Jovanovic EXPECT_EQ( 39be9e621aSdamjan osl_Process_E_None, 40be9e621aSdamjan osl_getProcessInfo(0, osl_Process_IDENTIFIER, &info)); 41be9e621aSdamjan return name + rtl::OUString::valueOf(static_cast< sal_Int64 >(info.Ident)); 42be9e621aSdamjan } 43be9e621aSdamjan 44be9e621aSdamjan } 45