Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / cppu / inc / uno / current_context.h
blob27c22ff74d70de0a7819bf4d2473b097cef50b48
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _UNO_CURRENT_CONTEXT_H_
29 #define _UNO_CURRENT_CONTEXT_H_
31 #include <cppu/cppudllapi.h>
32 #include <rtl/ustring.h>
34 #ifdef __cplusplus
35 extern "C"
37 #endif
39 /** Gets the current task's context.
40 @attention
41 Don't spread the returned interface around to other threads. Every thread has its own
42 current context.
44 @param ppCurrentContext inout param current context of type com.sun.star.uno.XCurrentContext
45 @param pEnvDcp descriptor of returned interface's environment
46 @param pEnvContext context of returned interface's environment (commonly 0)
47 @return true, if context ref was transferred (even if null ref)
49 CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_getCurrentContext(
50 void ** ppCurrentContext,
51 rtl_uString * pEnvDcp, void * pEnvContext )
52 SAL_THROW_EXTERN_C();
54 /** Sets the current task's context.
56 @param pCurrentContext in param current context of type com.sun.star.uno.XCurrentContext
57 @param pEnvDcp descriptor of interface's environment
58 @param pEnvContext context of interface's environment (commonly 0)
59 @return true, if context ref was transferred (even if null ref)
61 CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_setCurrentContext(
62 void * pCurrentContext,
63 rtl_uString * pEnvDcp, void * pEnvContext )
64 SAL_THROW_EXTERN_C();
66 #ifdef __cplusplus
68 #endif
70 #endif
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */