Skip to content

Commit

Permalink
First carved out version of JMAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
briandealwis committed Mar 25, 2011
0 parents commit e816430
Show file tree
Hide file tree
Showing 38 changed files with 4,447 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bzrignore
@@ -0,0 +1 @@
bin
7 changes: 7 additions & 0 deletions .classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions .project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jmapi</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
#Fri Mar 25 10:19:48 EDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
4 changes: 4 additions & 0 deletions .settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,4 @@
#Fri Mar 25 10:19:48 EDT 2011
eclipse.preferences.version=1
pluginProject.extensions=false
resolve.requirebundle=false
511 changes: 511 additions & 0 deletions COPYING

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JMAPI
Bundle-SymbolicName: jmapi
Bundle-Version: 1.0.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Bundle-Activator: jmapi.impl.Activator
Import-Package: org.osgi.framework
Export-Package: jmapi
Bundle-NativeCode: lib/win32/x86/jdic.dll; osname=win32; processor=x86, *
20 changes: 20 additions & 0 deletions README
@@ -0,0 +1,20 @@
JMAPI 1.0.0

JMAPI is a simple Java library for opening mail messages using MAPI
(which should use the user's preferred mailer).

The project was carved from the ashes of the JDesktop Integration
Components project (JDIC) (http://java.net/projects/jdic/) as JDIC
cannot be easily used within an OSGi bundle. Much of the remaining
functionality within JDIC has been absorbed into Java6 through
java.awt.Desktop.

JMAPI can likely still be be used from plain Java jars, but your
code will require loading the accompanying DLL; you might prefer
to use JDIC directly.

Currently only Windows 32-bit platforms are supported.

As with JDIC, JMAPI is licensed under the LGPL.

Please report bugs or issues to Brian de Alwis <bsd@mt.ca>.
2 changes: 2 additions & 0 deletions TODO
@@ -0,0 +1,2 @@
Rebuild the DLLs to strip the crufty bits from JDIC and
change references to org.jdesktop.
17 changes: 17 additions & 0 deletions build.properties
@@ -0,0 +1,17 @@
output.. = bin/
bin.includes = META-INF/,\
COPYING,\
README,\
jni/,\
lib/,\
src/,\
lib/jdic_stub_unix.jar,\
lib/jdic_stub_windows.jar,\
lib/jdic.jar,\
.
src.includes = COPYING,\
META-INF/,\
README,\
jni/,\
src/
source.. = src/
35 changes: 35 additions & 0 deletions jni/DisplayThread.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions jni/JNIloader.cpp
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2004 Sun Microsystems, Inc. All rights reserved. Use is
* subject to license terms.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*/

#include <comdef.h>
#include <atlbase.h>
#include <ExDisp.h>

#include "JNIloader.h"

/* Initialize the Java VM instance variable when the library
is first loaded */
JNIEXPORT jint JNICALL
JNI_OnLoad(JavaVM *vm, void *reserved)
{
CoInitialize(NULL);

jvm = vm;
return JNI_VERSION_1_2;
}

26 changes: 26 additions & 0 deletions jni/JNIloader.h
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2004 Sun Microsystems, Inc. All rights reserved. Use is
* subject to license terms.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*/

#include <jni.h>

/* The Java VM instance variable to be initialized the when the library
is first loaded. */
JavaVM *jvm;

0 comments on commit e816430

Please sign in to comment.