1 /* 2 * Copyright 2001-2005, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ingo Weinhold (bonefish@users.sf.net) 7 */ 8 9 //! Global library initialization/termination routines. 10 11 12 #include <stdio.h> 13 14 #include <ClipboardPrivate.h> 15 #include <MessagePrivate.h> 16 #include <RosterPrivate.h> 17 18 19 // debugging 20 //#define DBG(x) x 21 #define DBG(x) 22 #define OUT printf 23 24 25 extern "C" void 26 initialize_before() 27 { 28 DBG(OUT("initialize_before()\n")); 29 30 BMessage::Private::StaticInit(); 31 BRoster::Private::InitBeRoster(); 32 BPrivate::init_clipboard(); 33 34 DBG(OUT("initialize_before() done\n")); 35 } 36 37 38 extern "C" void 39 terminate_after() 40 { 41 DBG(OUT("terminate_after()\n")); 42 43 BRoster::Private::DeleteBeRoster(); 44 BMessage::Private::StaticCleanup(); 45 BMessage::Private::StaticCacheCleanup(); 46 47 DBG(OUT("terminate_after() done\n")); 48 } 49 50