Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/trusted/plugin/dylib_unittest.h

Issue 7799028: Remove src/trusted/plugin (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix gyp file for necessary -I Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/trusted/plugin/desc_based_handle.cc ('k') | src/trusted/plugin/dylib_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 // Functions for dynamically loading the trusted plugin when running unit
6 // tests.
7
8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DYLIB_UNITTEST_H_
9 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DYLIB_UNITTEST_H_
10
11 #if NACL_WINDOWS
12 #include <windows.h>
13 typedef HINSTANCE DylibHandle;
14 typedef void (*SymbolHandle)();
15 #else
16 #include <dlfcn.h>
17 #include <inttypes.h>
18 typedef void* DylibHandle;
19 // uintptr_t is used here because ISO C++ won't allow casting from a void*
20 // (the return type of dlsym()) to a pointer-to-function. Instead,
21 // GetSymbolHandle() returns a uintptr_t which can then be cast into a pointer-
22 // to-function. This depends on uintptr_t being the same size (or larger than)
23 // void*.
24 typedef uintptr_t SymbolHandle;
25 #endif
26
27 // Load the dynamic library at |lib_path|. Returns NULL on error.
28 DylibHandle DylibOpen(const char* lib_path);
29
30 // Close the dynamic library and free all the system resources associated with
31 // it. Returns |true| on success.
32 bool DylibClose(DylibHandle dl_handle);
33
34 // Return a handle to the symbol named |name| in the library represented by
35 // |dl_handle|. Returns NULL ff the symbol does not exist, or some other error
36 // occurs.
37 SymbolHandle GetSymbolHandle(DylibHandle dl_handle, const char* name);
38
39 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_DYLIB_UNITTEST_H_
OLDNEW
« no previous file with comments | « src/trusted/plugin/desc_based_handle.cc ('k') | src/trusted/plugin/dylib_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698