UDK 3.2.7 C/C++ API Reference
rtl/unload.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 #ifndef _RTL_UNLOAD_H_
00029 #define _RTL_UNLOAD_H_
00030 
00031 #include <sal/types.h>
00032 #include <osl/time.h>
00033 #include <osl/interlck.h>
00034 #include <osl/module.h>
00035 
00105 #define COMPONENT_CANUNLOAD         "component_canUnload"
00106 typedef sal_Bool (SAL_CALL * component_canUnloadFunc)( TimeValue* pTime);
00107 
00108 
00111 #ifdef __cplusplus
00112 extern "C"
00113 {
00114 #endif
00115 
00166 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_registerModuleForUnloading( oslModule module);
00167 
00179 SAL_DLLPUBLIC void SAL_CALL rtl_unregisterModuleForUnloading( oslModule module);
00205 SAL_DLLPUBLIC void SAL_CALL rtl_unloadUnusedModules( TimeValue* libUnused);
00206 
00212 typedef void (SAL_CALL *rtl_unloadingListenerFunc)(void* id);
00227 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_addUnloadingListener( rtl_unloadingListenerFunc callback, void* _this);
00228 
00237 SAL_DLLPUBLIC void SAL_CALL rtl_removeUnloadingListener( sal_Int32 cookie );
00238 
00239 
00269 typedef struct _rtl_ModuleCount
00270 {
00271     void ( SAL_CALL * acquire ) ( struct _rtl_ModuleCount * that );
00272     void ( SAL_CALL * release ) ( struct _rtl_ModuleCount * that );
00273 }rtl_ModuleCount;
00274 
00275 
00276 #define MODULE_COUNT_INIT \
00277 { {rtl_moduleCount_acquire,rtl_moduleCount_release}, rtl_moduleCount_canUnload, 0, {0, 0}}
00278 
00286 typedef struct _rtl_StandardModuleCount
00287 {
00288     rtl_ModuleCount modCnt;
00289      sal_Bool ( *canUnload ) ( struct _rtl_StandardModuleCount* a, TimeValue* libUnused);
00290     oslInterlockedCount counter;
00291     TimeValue unusedSince;
00292 } rtl_StandardModuleCount;
00293 
00297 SAL_DLLPUBLIC void rtl_moduleCount_acquire(rtl_ModuleCount * that );
00302 SAL_DLLPUBLIC void rtl_moduleCount_release( rtl_ModuleCount * that );
00303 
00307 SAL_DLLPUBLIC sal_Bool rtl_moduleCount_canUnload( rtl_StandardModuleCount * that, TimeValue* libUnused);
00308 
00309 
00310 #ifdef __cplusplus
00311 }
00312 #endif
00313 
00314 
00315 #endif
00316 
00317 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines