OSDN Git Service

2018/10/13(Sat) 20:55
[drdeamon64/drdeamon64.git] / include / libgoblin.h
1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
2
3                          D r . D e a m o n  6 4
4                         for INTEL64(R), AMD64(R)
5         
6    Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10
11  1. Redistributions of source code must retain the above copyright notice,
12     this list of conditions and the following disclaimer.
13  2. Redistributions in binary form must reproduce the above copyright
14     notice, this list of conditions and the following disclaimer in the
15     documentation and/or other materials provided with the distribution.
16
17 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
30
31 /* File Info -----------------------------------------------------------
32 File: drd64_.h
33 Function: Header 
34 Comment: 
35 ----------------------------------------------------------------------*/
36
37 #ifndef DRD64_HEADER_LIBGOBLIN
38 #define DRD64_HEADER_LIBGOBLIN
39
40 #include"./drd64_types.h"
41 #include"./drd64_defines.h"
42 #include"./drd64_error.h"
43
44 typedef struct  {
45         char    str_remotepath[DRD64_MAX_PATH];
46         char    str_localpath[DRD64_MAX_PATH];
47         char    str_filename[DRD64_MAX_PATH];
48         char    str_rpath[DRD64_MAX_PATH];
49         int             i_bid;
50 } LibGoblin_ObjectFilePath;
51
52 #ifdef DRD64_HEADER_LIBGOBLIN_MAIN
53         #define LIBGOBLIN_FUNC
54 #else
55         #define LIBGOBLIN_FUNC  extern
56 #endif
57
58
59 #ifdef DRD64_SRC_LIBGOBLIN_API
60         #define LIBGOBLIN_API
61 #else
62         #define LIBGOBLIN_API   extern
63 #endif
64 LIBGOBLIN_API
65         int LibGoblin_GetUnresolv_ObjectFilePath( int i_pgid, LibGoblin_ObjectFilePath *p_objpath );
66 LIBGOBLIN_API
67         int LibGoblin_SetPathAndLoad_ObjectFilePath( LibGoblin_ObjectFilePath *p_objpath );
68 LIBGOBLIN_API
69         int LibGoblin_LoadProgram_Main(
70                                 int i_pgid, const char *pstr_remotefull, const char *pstr_localfull );
71 LIBGOBLIN_API
72         int LibGoblin_AllocBinInfo( int i_pgid, const char *pstr_filename );
73 LIBGOBLIN_API
74         int LibGoblin_FreeBinInfo( int i_binfoid );
75 LIBGOBLIN_API
76         int LibGoblin_AllocProgInfo( void );
77 LIBGOBLIN_API
78         int LibGoblin_FreeProgInfo( int i_pgid );
79 LIBGOBLIN_API
80         int LibGoblin_Init( void );
81 LIBGOBLIN_API
82         int LibGoblin_Term( void );
83
84 #ifdef DRD64_SRC_LIBGOBLIN_PROGINFO
85         #define LIBGOBLIN_API_PROGINFO
86 #else
87         #define LIBGOBLIN_API_PROGINFO  extern
88 #endif
89
90 #ifdef DRD64_SRC_LIBGOBLIN_BINFO
91         #define LIBGOBLIN_API_BINFO
92 #else
93         #define LIBGOBLIN_API_BINFO     extern
94 #endif
95 LIBGOBLIN_API_BINFO
96         const char *LibGoblin_GetRPath_fromBinInfo( int i_bid, char *pstr_rpath );
97
98 #ifdef DRD64_SRC_LIBGOBLIN_LOADPROG
99         #define LIBGOBLIN_API_LOADPROG
100 #else
101         #define LIBGOBLIN_API_LOADPROG  extern
102 #endif
103 LIBGOBLIN_API_LOADPROG
104         int LibGoblin_LoadProgram_Main(
105                         int i_pgid, const char *pstr_progpath, const char *pstr_realpath );
106
107
108
109 #endif  /* DRD64_HEADER_LIBGOBLIN */
110
111 /* EOF of drd64_.h ----------------------------------- */