1*24f6443dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*24f6443dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*24f6443dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*24f6443dSAndrew Rist * distributed with this work for additional information 6*24f6443dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*24f6443dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*24f6443dSAndrew Rist * "License"); you may not use this file except in compliance 9*24f6443dSAndrew Rist * with the License. You may obtain a copy of the License at 10*24f6443dSAndrew Rist * 11*24f6443dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*24f6443dSAndrew Rist * 13*24f6443dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*24f6443dSAndrew Rist * software distributed under the License is distributed on an 15*24f6443dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*24f6443dSAndrew Rist * KIND, either express or implied. See the License for the 17*24f6443dSAndrew Rist * specific language governing permissions and limitations 18*24f6443dSAndrew Rist * under the License. 19*24f6443dSAndrew Rist * 20*24f6443dSAndrew Rist *************************************************************/ 21*24f6443dSAndrew Rist 22*24f6443dSAndrew Rist 23cdf0e10cSrcweir #ifndef _UNO_CURRENT_CONTEXT_H_ 24cdf0e10cSrcweir #define _UNO_CURRENT_CONTEXT_H_ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <rtl/ustring.h> 27cdf0e10cSrcweir 28cdf0e10cSrcweir #ifdef __cplusplus 29cdf0e10cSrcweir extern "C" 30cdf0e10cSrcweir { 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir 33cdf0e10cSrcweir /** Gets the current task's context. 34cdf0e10cSrcweir @attention 35cdf0e10cSrcweir Don't spread the returned interface around to other threads. Every thread has its own 36cdf0e10cSrcweir current context. 37cdf0e10cSrcweir 38cdf0e10cSrcweir @param ppCurrentContext inout param current context of type com.sun.star.uno.XCurrentContext 39cdf0e10cSrcweir @param pEnvDcp descriptor of returned interface's environment 40cdf0e10cSrcweir @param pEnvContext context of returned interface's environment (commonly 0) 41cdf0e10cSrcweir @return true, if context ref was transferred (even if null ref) 42cdf0e10cSrcweir */ 43cdf0e10cSrcweir sal_Bool SAL_CALL uno_getCurrentContext( 44cdf0e10cSrcweir void ** ppCurrentContext, 45cdf0e10cSrcweir rtl_uString * pEnvDcp, void * pEnvContext ) 46cdf0e10cSrcweir SAL_THROW_EXTERN_C(); 47cdf0e10cSrcweir 48cdf0e10cSrcweir /** Sets the current task's context. 49cdf0e10cSrcweir 50cdf0e10cSrcweir @param pCurrentContext in param current context of type com.sun.star.uno.XCurrentContext 51cdf0e10cSrcweir @param pEnvDcp descriptor of interface's environment 52cdf0e10cSrcweir @param pEnvContext context of interface's environment (commonly 0) 53cdf0e10cSrcweir @return true, if context ref was transferred (even if null ref) 54cdf0e10cSrcweir */ 55cdf0e10cSrcweir sal_Bool SAL_CALL uno_setCurrentContext( 56cdf0e10cSrcweir void * pCurrentContext, 57cdf0e10cSrcweir rtl_uString * pEnvDcp, void * pEnvContext ) 58cdf0e10cSrcweir SAL_THROW_EXTERN_C(); 59cdf0e10cSrcweir 60cdf0e10cSrcweir #ifdef __cplusplus 61cdf0e10cSrcweir } 62cdf0e10cSrcweir #endif 63cdf0e10cSrcweir 64cdf0e10cSrcweir #endif 65