Commit c821d1fd authored by Viet-Trung Luu's avatar Viet-Trung Luu

Remove third_party/npapi/npspy.

R=cpu@chromium.org, thestig@chromium.org

Review URL: https://codereview.chromium.org/665543002

Cr-Commit-Position: refs/heads/master@{#300132}
parent 5c4699c2
# A script for analyzing the output of NPSPY and merging data about streams.
import sys
def ReadFile(filename, flags='rb'):
"""Returns the contents of a file."""
file = open(filename, flags)
result = file.read()
file.close()
return result
def WriteFile(filename, contents):
"""Overwrites the file with the given contents."""
file = open(filename, 'w')
file.write(contents)
file.close()
# sample line: 'NPP_NewStream(0x645c898, 0x56ba900("application/x-shockwave-flash"), 0x64bb3b0 (http://weeklyad.target.com/target/flash/target/target.swf?ver=090326), TRUE, NP_NORMAL)'
class Stream:
def __init__(self, line):
split = line.split(', ')
self.mime_type = split[1].split('"')[1]
self.url = split[2].split(' ')[1].strip('()')
self.seekable = split[3]
self.type = split[4].strip(')')
self.size = 0
self.status = ''
try:
self.address = split[2].split(' ')[0]
except:
print 'parsing error on ' + line
self.address = ''
if self.type != 'NP_NORMAL':
print 'line got unexpected type: ' + line
def main(argv=None):
if argv is None:
argv = sys.argv
streams = []
if len(argv) != 2:
print 'need filename'
return
file = ReadFile(argv[1])
for line in file.splitlines():
if line.startswith('NPP_NewStream('):
if line.count('(') < 3:
print 'unknown format for line: ' + line
continue
s = Stream(line)
streams.append(s)
elif line.startswith('NPP_Write('):
# sample: NPP_Write(0x645c898, 0x64bb3b0, 0, 16384, 0x56c1000("CW")))
split = line.split(', ')
address = split[1]
start = int(split[2])
size = int(split[3])
found = False
for stream in streams:
if stream.address == address:
if stream.size != start:
print 'error: starting at wrong place for write ' + stream.url + ' ' + str(stream.size) + ' ' + str(start)
stream.size += size
found = True
break
if not found:
print "couldn't find stream to match NPP_Write " + line
elif line.startswith('NPP_DestroyStream('):
# sample: NPP_DestroyStream(0x645c898, 0x64bb3b0, NPRES_DONE)
split = line.split(', ')
address = split[1]
status = split[2].strip(')')
found = False
for stream in streams:
if stream.address == address:
stream.status = status
stream.address = '' # address can be reused
found = True
break
if not found:
print "couldn't find stream to match NPP_DestroyStream " + line
output = []
for stream in streams:
if stream.status != 'NPRES_DONE':
print 'error: no NPP_DestroyStream with success for ' + stream.url + ' ' + stream.status + '.'
output.append(', '.join([stream.url, stream.mime_type, str(stream.size), stream.seekable]))
output_file = argv[1].replace('.', '_analyzed.')
WriteFile(output_file, '\n'.join(output))
if __name__ == "__main__":
sys.exit(main())
This diff is collapsed.
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "xp.h"
#include "logfile.h"
#include "plugload.h"
CLogFile::CLogFile() :
hFile(NULL)
{
szFileName[0] = '\0';
}
CLogFile::~CLogFile()
{
if(hFile != NULL)
close();
}
BOOL CLogFile::create(char * filename, BOOL delete_existing)
{
strcpy(szFileName, filename);
if(!delete_existing && XP_IsFile(szFileName))
return FALSE;
hFile = XP_CreateFile(szFileName);
return (hFile != NULL);
}
void CLogFile::close()
{
if(hFile != NULL)
{
XP_CloseFile(hFile);
hFile = NULL;
}
}
DWORD CLogFile::write(const std::string& buf)
{
return XP_WriteFile(hFile, buf.c_str(), buf.length());
}
void CLogFile::flush()
{
XP_FlushFileBuffers(hFile);
}
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "xp.h"
#include "npapi.h"
#include "npupp.h"
#include "epmanager.h"
#include "logger.h"
// we need to keep track of different plugins and different instances
// of the same plugin when we call NPP functions, so that we always
// call the right ones. Entry point manager will take care of it.
NPPEntryPointManager * epManager = NULL;
Logger * logger = NULL;
NPNetscapeFuncs NPNFuncs;
NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs)
{
// create the logger
if(!logger)
{
logger = NewLogger();
if(logger)
{
logger->platformInit();
logger->init();
}
}
if(logger)
logger->logNS_NP_GetEntryPoints();
if(pFuncs == NULL)
return NPERR_INVALID_FUNCTABLE_ERROR;
if(pFuncs->size < sizeof(NPPluginFuncs))
return NPERR_INVALID_FUNCTABLE_ERROR;
pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
pFuncs->newp = NPP_New;
pFuncs->destroy = NPP_Destroy;
pFuncs->setwindow = NPP_SetWindow;
pFuncs->newstream = NPP_NewStream;
pFuncs->destroystream = NPP_DestroyStream;
pFuncs->asfile = NPP_StreamAsFile;
pFuncs->writeready = NPP_WriteReady;
pFuncs->write = NPP_Write;
pFuncs->print = NPP_Print;
pFuncs->event = NPP_HandleEvent;
pFuncs->urlnotify = NPP_URLNotify;
pFuncs->getvalue = NPP_GetValue;
pFuncs->setvalue = NPP_SetValue;
pFuncs->javaClass = NULL;
return NPERR_NO_ERROR;
}
NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs)
{
// DebugBreak();
// create the logger
if(!logger)
{
logger = NewLogger();
if(logger)
{
logger->platformInit();
logger->init();
}
}
if(logger)
logger->logNS_NP_Initialize();
if(pFuncs == NULL) {
logger->logMessage("NP_Initialize: NULL functable!\r\n");
return NPERR_INVALID_FUNCTABLE_ERROR;
}
if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR) {
logger->logMessage("NP_Initialize: incompatible version!\r\n");
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
/*
*
* Removing this check so that we can work with older versions
* of servers (which may provide fewer functions)
*
if(pFuncs->size < sizeof NPNetscapeFuncs) {
logger->logReturn(NPERR_INVALID_FUNCTABLE_ERROR);
char msg[512];
sprintf(msg, "functable is %d, expected %d", pFuncs->size, sizeof(NPNetscapeFuncs));
logger->logMessage(msg);
return NPERR_INVALID_FUNCTABLE_ERROR;
}
*
*/
NPNFuncs.size = pFuncs->size;
NPNFuncs.version = pFuncs->version;
NPNFuncs.geturlnotify = pFuncs->geturlnotify;
NPNFuncs.geturl = pFuncs->geturl;
NPNFuncs.posturlnotify = pFuncs->posturlnotify;
NPNFuncs.posturl = pFuncs->posturl;
NPNFuncs.requestread = pFuncs->requestread;
NPNFuncs.newstream = pFuncs->newstream;
NPNFuncs.write = pFuncs->write;
NPNFuncs.destroystream = pFuncs->destroystream;
NPNFuncs.status = pFuncs->status;
NPNFuncs.uagent = pFuncs->uagent;
NPNFuncs.memalloc = pFuncs->memalloc;
NPNFuncs.memfree = pFuncs->memfree;
NPNFuncs.memflush = pFuncs->memflush;
NPNFuncs.reloadplugins = pFuncs->reloadplugins;
NPNFuncs.getJavaEnv = pFuncs->getJavaEnv;
NPNFuncs.getJavaPeer = pFuncs->getJavaPeer;
NPNFuncs.getvalue = pFuncs->getvalue;
NPNFuncs.setvalue = pFuncs->setvalue;
NPNFuncs.invalidaterect = pFuncs->invalidaterect;
NPNFuncs.invalidateregion = pFuncs->invalidateregion;
NPNFuncs.forceredraw = pFuncs->forceredraw;
NPNFuncs.getstringidentifier = pFuncs->getstringidentifier;
NPNFuncs.getstringidentifiers = pFuncs->getstringidentifiers;
NPNFuncs.identifierisstring = pFuncs->identifierisstring;
NPNFuncs.utf8fromidentifier = pFuncs->utf8fromidentifier;
NPNFuncs.intfromidentifier = pFuncs->intfromidentifier;
NPNFuncs.createobject = pFuncs->createobject;
NPNFuncs.retainobject = pFuncs->retainobject;
NPNFuncs.releaseobject = pFuncs->releaseobject;
NPNFuncs.invoke = pFuncs->invoke;
NPNFuncs.invokeDefault = pFuncs->invokeDefault;
NPNFuncs.evaluate = pFuncs->evaluate;
NPNFuncs.getproperty = pFuncs->getproperty;
NPNFuncs.setproperty = pFuncs->setproperty;
NPNFuncs.removeproperty = pFuncs->removeproperty;
NPNFuncs.hasproperty = pFuncs->hasproperty;
NPNFuncs.hasmethod = pFuncs->hasmethod;
NPNFuncs.releasevariantvalue = pFuncs->releasevariantvalue;
NPNFuncs.setexception = pFuncs->setexception;
NPNFuncs.pushpopupsenabledstate = pFuncs->pushpopupsenabledstate;
NPNFuncs.poppopupsenabledstate = pFuncs->poppopupsenabledstate;
NPNFuncs.enumerate = pFuncs->enumerate;
// create entry point manager for real plugins
epManager = new NPPEntryPointManager();
if(!epManager) {
logger->logMessage("NP_Initialize: could not create EntryPointManager\r\n");
return NPERR_GENERIC_ERROR;
}
logger->logMessage("NP_Initialize: success\r\n");
return NPERR_NO_ERROR;
}
NPError WINAPI NP_Shutdown()
{
// should be safe because if they've already been called shutdown procs must be NULL
if(epManager)
epManager->callNP_ShutdownAll(); // this will log the action
if(logger)
{
logger->shut();
logger->platformShut();
DeleteLogger(logger);
logger = NULL;
}
delete epManager;
return NPERR_NO_ERROR;
}
This diff is collapsed.
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <vector>
#include "xp.h"
#include "logger.h"
extern Logger * logger;
DWORD GetPluginsDir(char * path, DWORD maxsize)
{
if(!path)
return 0;
path[0] = '\0';
#ifdef XP_WIN
DWORD res = GetModuleFileName(NULL, path, maxsize);
if(res == 0)
return 0;
if(path[strlen(path) - 1] == '\\')
path[lstrlen(path) - 1] = '\0';
char *p = strrchr(path, '\\');
if(p)
*p = '\0';
strcat(path, "\\plugins");
#endif
#ifdef XP_UNIX
// Implement UNIX version
#endif
#ifdef XP_MAC
// Implement Mac version
#endif
res = strlen(path);
return res;
}
XP_HLIB LoadRealPlugin(char * mimetype)
{
if(!mimetype || !strlen(mimetype))
return NULL;
#ifdef XP_WIN
BOOL bDone = FALSE;
WIN32_FIND_DATA ffdataStruct;
char szPath[_MAX_PATH];
char szFileName[_MAX_PATH];
// DebugBreak();
GetPluginsDir(szPath, _MAX_PATH);
if(logger) {
char msg[512];
sprintf(msg, "LoadRealPlugin Path: %s\r\n", szPath);
logger->logMessage(msg);
}
strcpy(szFileName, szPath);
std::vector<std::string> directories;
directories.push_back(szFileName);
directories.push_back("C:\\Windows\\System32\\Macromed\\Flash");
directories.push_back("C:\\Windows\\SysWOW64\\Macromed\\Flash");
for (size_t i = 0; i < directories.size(); ++i) {
std::string search_path = directories[i];
search_path = search_path.append("\\np*.dll");
HANDLE handle = FindFirstFile(search_path.c_str(), &ffdataStruct);
if(handle == INVALID_HANDLE_VALUE)
{
FindClose(handle);
continue;
}
DWORD versize = 0L;
DWORD zero = 0L;
char * verbuf = NULL;
do
{
std::string cur_file = directories[i];
cur_file = cur_file.append("\\");
cur_file = cur_file.append(ffdataStruct.cFileName);
if(!(ffdataStruct. dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) &&
strstr(cur_file.c_str(), "npspy.dll") == NULL)
{
versize = GetFileVersionInfoSize(cur_file.c_str(), &zero);
if (versize > 0)
verbuf = new char[versize];
else
continue;
if(!verbuf)
continue;
GetFileVersionInfo(cur_file.c_str(), NULL, versize, verbuf);
char *mimetypes = NULL;
UINT len = 0;
if(!VerQueryValue(verbuf, "\\StringFileInfo\\040904E4\\MIMEType", (void **)&mimetypes, &len)
|| !mimetypes || !len)
{
delete [] verbuf;
continue;
}
// browse through a string of mimetypes
mimetypes[len] = '\0';
char * type = mimetypes;
BOOL more = TRUE;
while(more)
{
char * p = strchr(type, '|');
if(p)
*p = '\0';
else
more = FALSE;
if(0 == _stricmp(mimetype, type))
{
// this is it!
delete [] verbuf;
FindClose(handle);
HINSTANCE hLib = LoadLibrary(cur_file.c_str());
return hLib;
}
type = p;
type++;
}
delete [] verbuf;
}
} while(FindNextFile(handle, &ffdataStruct));
FindClose(handle);
}
#endif
#ifdef XP_UNIX
// Implement UNIX version
#endif
#ifdef XP_MAC
// Implement Mac version
#endif
return NULL;
}
void UnloadRealPlugin(XP_HLIB hLib)
{
#ifdef XP_WIN
if(!hLib)
FreeLibrary(hLib);
#endif
#ifdef XP_UNIX
// Implement UNIX version
#endif
#ifdef XP_MAC
// Implement Mac version
#endif
}
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "xp.h"
#include "profile.h"
Profile::Profile()
{
}
Profile::~Profile()
{
}
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "xp.h"
// file utils
BOOL XP_IsFile(char * szFileName)
{
#ifdef XP_WIN
OFSTRUCT of;
return (HFILE_ERROR != OpenFile(szFileName, &of, OF_EXIST));
#endif
#ifdef XP_UNIX
struct stat s;
return (stat(szFileName, &s) != -1);
#endif
#ifdef XP_MAC /* HACK */
return 1;
#endif
}
void XP_DeleteFile(char * szFileName)
{
#ifdef XP_WIN
DeleteFile(szFileName);
#else
remove(szFileName);
#endif
}
XP_HFILE XP_CreateFile(char * szFileName)
{
#ifdef XP_WIN
OFSTRUCT of;
HFILE hFile = OpenFile(szFileName, &of, OF_CREATE | OF_WRITE);
return (hFile != HFILE_ERROR) ? hFile : NULL;
#else
return (XP_HFILE)fopen(szFileName, "w+");
#endif
}
XP_HFILE XP_OpenFile(char * szFileName)
{
#ifdef XP_WIN
OFSTRUCT of;
HFILE hFile = OpenFile(szFileName, &of, OF_READ | OF_WRITE);
return (hFile != HFILE_ERROR) ? hFile : NULL;
#else
return (XP_HFILE)fopen(szFileName, "r+");
#endif
}
void XP_CloseFile(XP_HFILE hFile)
{
if(hFile != NULL)
{
#ifdef XP_WIN
CloseHandle((HANDLE)hFile);
#else
fclose(hFile);
#endif
}
}
DWORD XP_WriteFile(XP_HFILE hFile, const void * pBuf, int iSize)
{
#ifdef XP_WIN
DWORD dwRet;
WriteFile((HANDLE)hFile, pBuf, iSize, &dwRet, NULL);
return dwRet;
#else
return (DWORD)fwrite(pBuf, iSize, 1, hFile);
#endif
}
void XP_FlushFileBuffers(XP_HFILE hFile)
{
#ifdef XP_WIN
FlushFileBuffers((HANDLE)hFile);
#else
fflush(hFile);
#endif
}
// misc utils
void * XP_GetSymbol(XP_HLIB hLib, char * szProcName)
{
#ifdef XP_WIN
return (void *)GetProcAddress(hLib, szProcName);
#endif
}
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _BOOL_H_
#define _BOOL_H_
#include "prtypes.h"
typedef PRBool bool_t;
#endif /* !_BOOL_H_ */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _INTERPRETER_H_
#define _INTERPRETER_H_
#include "prtypes.h"
PR_BEGIN_EXTERN_C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bool.h"
#include "jni.h"
typedef struct execenv ExecEnv;
typedef void JavaStack;
typedef void JavaFrame;
struct Hjava_lang_ClassLoader;
JRI_PUBLIC_API(JHandle *)
ArrayAlloc(int32_t, int32_t);
JRI_PUBLIC_API(JavaFrame *)
CompiledFramePrev(JavaFrame *, JavaFrame *);
JRI_PUBLIC_API(JavaStack *)
CreateNewJavaStack(ExecEnv *, JavaStack *);
JRI_PUBLIC_API(bool_t)
ExecuteJava(unsigned char *, ExecEnv *);
JRI_PUBLIC_API(ClassClass *)
FindClassFromClass(struct execenv *, char *, bool_t, ClassClass *);
JRI_PUBLIC_API(ClassClass *)
FindLoadedClass(char *, struct Hjava_lang_ClassLoader *);
JRI_PUBLIC_API(void)
PrintToConsole(const char *);
JRI_PUBLIC_API(bool_t)
VerifyClassAccess(ClassClass *, ClassClass *, bool_t);
JRI_PUBLIC_API(bool_t)
VerifyFieldAccess(ClassClass *, ClassClass *, int, bool_t);
JRI_PUBLIC_API(long)
do_execute_java_method(ExecEnv *, void *, char *, char *,
struct methodblock *, bool_t, ...);
JRI_PUBLIC_API(long)
do_execute_java_method_vararg(ExecEnv *, void *, char *, char *,
struct methodblock *, bool_t, va_list,
long *, bool_t);
JRI_PUBLIC_API(HObject *)
execute_java_constructor_vararg(struct execenv *, char *, ClassClass *,
char *, va_list);
JRI_PUBLIC_API(HObject *)
execute_java_constructor(ExecEnv *, char *, ClassClass *, char *, ...);
JRI_PUBLIC_API(bool_t)
is_subclass_of(ClassClass *, ClassClass *, ExecEnv *);
JRI_PUBLIC_API(HObject*)
newobject(ClassClass *, unsigned char *, struct execenv *);
JRI_PUBLIC_API(int32_t)
sizearray(int32_t, int32_t);
PR_END_EXTERN_C
#endif /* ! _INTERPRETER_H_ */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _JAVASTRING_H_
#define _JAVASTRING_H_
#include "oobj.h"
#include "jdk_java_lang_String.h"
JRI_PUBLIC_API(Hjava_lang_String *)
makeJavaString(char *, int);
#endif /* !_JAVASTRING_H_ */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _JAVATHREADS_H_
#define _JAVATHREADS_H_
#include "oobj.h"
#include "interpreter.h"
#include "bool.h"
#endif /* !_JAVATHREADS_H_ */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _Included_java_lang_String
#define _Included_java_lang_String
typedef void Hjava_lang_String;
#endif
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _Included_java_lang_String
#define _Included_java_lang_String
typedef void Hjava_lang_String;
#endif
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef JMC_H
#define JMC_H
#include "jritypes.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define JMC_PUBLIC_API JRI_PUBLIC_API
typedef struct JMCInterfaceID {
jint a, b, c, d;
} JMCInterfaceID;
#ifdef __cplusplus
#define EXTERN_C extern "C"
#define EXTERN_C_WITHOUT_EXTERN "C"
#else
#undef EXTERN_C
#define EXTERN_C
#define EXTERN_C_WITHOUT_EXTERN
#endif /* cplusplus */
typedef struct JMCException JMCException;
JRI_PUBLIC_API(void)
JMCException_Destroy(struct JMCException *);
#define JMC_EXCEPTION(resultPtr, exceptionToReturn) \
(((resultPtr) != NULL) \
? ((*(resultPtr) = (exceptionToReturn), resultPtr)) \
: (JMCException_Destroy(exceptionToReturn), resultPtr))
#define JMC_EXCEPTION_RETURNED(resultPtr) \
((resultPtr) != NULL && *(resultPtr) != NULL)
#define JMCEXCEPTION_OUT_OF_MEMORY ((struct JMCException*)-1)
#define JMC_DELETE_EXCEPTION(resultPtr) \
(JMCException_Destroy(*(resultPtr)), *(resultPtr) = NULL)
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* JMC_H */
This diff is collapsed.
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
*
* This Original Code has been modified by IBM Corporation.
* Modifications made by IBM described herein are
* Copyright (c) International Business Machines
* Corporation, 2000
*
* Modifications to Mozilla code or documentation
* identified per MPL Section 3.3
*
* Date Modified by Description of modification
* 03/27/2000 IBM Corp. Set JNICALL to Optlink for
* use in OS2
*/
/*******************************************************************************
* Netscape version of jni_md.h -- depends on jri_md.h
******************************************************************************/
#ifndef JNI_MD_H
#define JNI_MD_H
#include "prtypes.h" /* needed for _declspec */
/*******************************************************************************
* WHAT'S UP WITH THIS FILE?
*
* This is where we define the mystical JNI_PUBLIC_API macro that works on all
* platforms. If you're running with Visual C++, Symantec C, or Borland's
* development environment on the PC, you're all set. Or if you're on the Mac
* with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't
* matter.
* Changes by sailesh on 9/26
* There are two symbols used in the declaration of the JNI functions
* and native code that uses the JNI:
* JNICALL - specifies the calling convention
* JNIEXPORT - specifies export status of the function
*
* The syntax to specify calling conventions is different in Win16 and
* Win32 - the brains at Micro$oft at work here. JavaSoft in their
* infinite wisdom cares for no platform other than Win32, and so they
* just define these two symbols as:
#define JNIEXPORT __declspec(dllexport)
#define JNICALL __stdcall
* We deal with this, in the way JRI defines the JRI_PUBLIC_API, by
* defining a macro called JNI_PUBLIC_API. Any of our developers who
* wish to use code for Win16 and Win32, _must_ use JNI_PUBLIC_API to
* be able to export functions properly.
* Since we must also maintain compatibility with JavaSoft, we
* continue to define the symbol JNIEXPORT. However, use of this
* internally is deprecated, since it will cause a mess on Win16.
* We _do not_ need a new symbol called JNICALL. Instead we
* redefine JNICALL in the same way JRI_CALLBACK was defined.
******************************************************************************/
/* DLL Entry modifiers... */
#if defined(XP_OS2)
# ifdef XP_OS2_VACPP
# define JNI_PUBLIC_API(ResultType) ResultType _System
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNICALL _Optlink
# define JNIEXPORT
# else
# define JNI_PUBLIC_API(ResultType) ResultType
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNICALL
# define JNIEXPORT
# endif
/* Win32 */
#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
# include <windows.h>
# if defined(_MSC_VER) || defined(__GNUC__)
# if defined(WIN32) || defined(_WIN32)
# define JNI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType __stdcall
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType
# define JNICALL __stdcall
# else /* !_WIN32 */
# if defined(_WINDLL)
# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds
# define JNICALL __loadds
# else /* !WINDLL */
# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __export
# define JNICALL __export
# endif /* !WINDLL */
# endif /* !_WIN32 */
# elif defined(__BORLANDC__)
# if defined(WIN32) || defined(_WIN32)
# define JNI_PUBLIC_API(ResultType) __export ResultType
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) __export ResultType
# define JNICALL
# else /* !_WIN32 */
# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds
# define JNICALL _loadds
# endif
# else
# error Unsupported PC development environment.
# endif
# ifndef IS_LITTLE_ENDIAN
# define IS_LITTLE_ENDIAN
# endif
/* This is the stuff inherited from JavaSoft .. */
# define JNIEXPORT __declspec(dllexport)
/* Mac */
#elif macintosh || Macintosh || THINK_C
# if defined(__MWERKS__) /* Metrowerks */
# if !__option(enumsalwaysint)
# error You need to define 'Enums Always Int' for your project.
# endif
# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM
# if !__option(fourbyteints)
# error You need to define 'Struct Alignment: 68k' for your project.
# endif
# endif /* !GENERATINGCFM */
# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType
# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType)
# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType)
# elif defined(__SC__) /* Symantec */
# error What are the Symantec defines? (warren@netscape.com)
# elif macintosh && applec /* MPW */
# error Please upgrade to the latest MPW compiler (SC).
# else
# error Unsupported Mac development environment.
# endif
# define JNICALL
/* This is the stuff inherited from JavaSoft .. */
# define JNIEXPORT
/* Unix or else */
#else
# define JNI_PUBLIC_API(ResultType) ResultType
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType
# define JNICALL
/* This is the stuff inherited from JavaSoft .. */
# define JNIEXPORT
#endif
#ifndef FAR /* for non-Win16 */
#define FAR
#endif
/* Get the rest of the stuff from jri_md.h */
#include "jri_md.h"
#endif /* JNI_MD_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef sun_java_nspr_md_h___
#define sun_java_nspr_md_h___
#include "nspr.h"
#endif /* sun_java_nspr_md_h___ */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _OOBJ_H_
#define _OOBJ_H_
#include <stddef.h>
#include "typedefs.h"
#include "bool.h"
#include "jriext.h"
typedef void Hjava_lang_Class;
typedef Hjava_lang_Class ClassClass;
typedef void Hjava_lang_Object;
typedef Hjava_lang_Object HObject;
typedef Hjava_lang_Object JHandle;
struct methodblock;
JRI_PUBLIC_API(void)
MakeClassSticky(ClassClass *cb);
#endif /* !_OOBJ_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment