1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: current_context.h,v $
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 #ifndef _UNO_CURRENT_CONTEXT_H_
31 #define _UNO_CURRENT_CONTEXT_H_
33 #include <rtl/ustring.h>
40 /** Gets the current task's context.
42 Don't spread the returned interface around to other threads. Every thread has its own
45 @param ppCurrentContext inout param current context of type com.sun.star.uno.XCurrentContext
46 @param pEnvDcp descriptor of returned interface's environment
47 @param pEnvContext context of returned interface's environment (commonly 0)
48 @return true, if context ref was transferred (even if null ref)
50 sal_Bool SAL_CALL
uno_getCurrentContext(
51 void ** ppCurrentContext
,
52 rtl_uString
* pEnvDcp
, void * pEnvContext
)
55 /** Sets the current task's context.
57 @param pCurrentContext in param current context of type com.sun.star.uno.XCurrentContext
58 @param pEnvDcp descriptor of interface's environment
59 @param pEnvContext context of interface's environment (commonly 0)
60 @return true, if context ref was transferred (even if null ref)
62 sal_Bool SAL_CALL
uno_setCurrentContext(
63 void * pCurrentContext
,
64 rtl_uString
* pEnvDcp
, void * pEnvContext
)