OmxCoreLibLinker.h (897B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef __OmxCoreLibLinker_h__ 8 #define __OmxCoreLibLinker_h__ 9 10 struct PRLibrary; 11 12 namespace mozilla { 13 14 class OmxCoreLibLinker { 15 public: 16 static bool Link(); 17 static void Unlink(); 18 19 private: 20 static PRLibrary* sLinkedLib; 21 static const char* sLibName; 22 static const char* sLibNames[]; 23 24 static bool TryLinkingLibrary(const char* libName); 25 static bool Bind(const char* aLibName); 26 27 static enum LinkStatus { 28 LinkStatus_INIT = 0, 29 LinkStatus_FAILED, 30 LinkStatus_SUCCEEDED 31 } sLinkStatus; 32 }; 33 34 } // namespace mozilla 35 36 #endif // __OmxCoreLibLinker_h__