Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
frascati
frascati
Commits
c3ec12c1
Commit
c3ec12c1
authored
Aug 10, 2010
by
Romain Rouvoy
Browse files
Renaming the basic JNA example.
parent
2ce431d4
Changes
8
Hide whitespace changes
Inline
Side-by-side
examples/examples-native/helloworld-jna/README.txt
→
examples/examples-native/helloworld-
binding-
jna/README.txt
View file @
c3ec12c1
File moved
examples/examples-native/helloworld-jna/pom.xml
→
examples/examples-native/helloworld-
binding-
jna/pom.xml
View file @
c3ec12c1
File moved
examples/examples-native/helloworld-jna/src/main/java/jna/hw/Client.java
→
examples/examples-native/helloworld-
binding-
jna/src/main/java/jna/hw/Client.java
View file @
c3ec12c1
/**
/**
*
* OW2 FraSCAti Examples: HelloWorld with JNA
* Copyright (C) 2010 INRIA, University of Lille 1
*
...
...
@@ -18,7 +18,7 @@
*
* Author: Romain Rouvoy
*
* Contributor(s):
Philippe Merle
* Contributor(s):
*
*/
package
jna.hw
;
...
...
@@ -31,14 +31,12 @@ import org.osoa.sca.annotations.Reference;
*
* @Author <a href="romain.rouvoy@lifl.fr">Romain Rouvoy</a>
*/
public
class
Client
implements
Runnable
{
public
class
Client
implements
Runnable
{
@Reference
private
Service
service
;
public
final
void
run
()
{
public
void
run
()
{
service
.
printf
(
"Hello, World!\n"
);
}
}
}
\ No newline at end of file
examples/examples-native/helloworld-jna/src/main/java/jna/hw/Service.java
→
examples/examples-native/helloworld-
binding-
jna/src/main/java/jna/hw/Service.java
View file @
c3ec12c1
/**
/**
*
* OW2 FraSCAti Examples: HelloWorld with JNA
* Copyright (C) 2010 INRIA, University of Lille 1
*
...
...
@@ -30,9 +30,8 @@ import com.sun.jna.Library;
*
* @Author <a href="romain.rouvoy@lifl.fr">Romain Rouvoy</a>
*/
public
interface
Service
extends
Library
{
public
interface
Service
extends
Library
{
/**
* Reflection of the method printf() provided by the library stdio.h
*/
...
...
examples/examples-native/helloworld-jna/src/main/resources/helloworld-jna-windows.composite
→
examples/examples-native/helloworld-
binding-
jna/src/main/resources/helloworld-jna-windows.composite
View file @
c3ec12c1
File moved
examples/examples-native/helloworld-jna/src/main/resources/helloworld-jna.composite
→
examples/examples-native/helloworld-
binding-
jna/src/main/resources/helloworld-jna.composite
View file @
c3ec12c1
File moved
examples/examples-native/helloworld-jna/src/test/java/org/ow2/frascati/examples/helloworld/jna/test/HelloWorldJNATestCase.java
→
examples/examples-native/helloworld-
binding-
jna/src/test/java/org/ow2/frascati/examples/helloworld/jna/test/HelloWorldJNATestCase.java
View file @
c3ec12c1
/**
/**
*
* OW2 FraSCAti Examples: HelloWorld JNA
* Copyright (C) 2010 INRIA, University of Lille 1
*
...
...
@@ -32,12 +32,10 @@ import org.ow2.frascati.examples.test.FraSCAtiTestCase;
* Test the HelloWorld JNA composite.
*
*/
public
class
HelloWorldJNATestCase
extends
FraSCAtiTestCase
{
public
class
HelloWorldJNATestCase
extends
FraSCAtiTestCase
{
@Override
public
final
String
getComposite
()
{
public
String
getComposite
()
{
String
composite
=
"helloworld-jna"
;
String
osName
=
System
.
getProperty
(
"os.name"
);
...
...
@@ -49,9 +47,8 @@ public class HelloWorldJNATestCase
}
@Test
public
final
void
testService
()
{
public
void
testService
()
{
getService
(
Runnable
.
class
,
"r"
).
run
();
}
}
examples/examples-native/pom.xml
View file @
c3ec12c1
...
...
@@ -42,7 +42,7 @@
<artifactId>
parent
</artifactId>
<packaging>
pom
</packaging>
<name>
OW2 FraSCAti:
JN
A Examples
</name>
<name>
OW2 FraSCAti:
SC
A Examples
Native
</name>
<properties>
<logging.conf.file>
../../logging.properties
</logging.conf.file>
...
...
@@ -54,6 +54,7 @@
<modules>
<module>
helloworld-jna
</module>
<module>
helloworld-native
</module>
</modules>
<!-- ============ -->
...
...
@@ -61,13 +62,13 @@
<!-- ============ -->
<dependencies>
<dependency>
<groupId>
org.ow2.frascati.native
</groupId>
<artifactId>
frascati-binding-jna
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.ow2.frascati.examples.test
</groupId>
<artifactId>
frascati-test
</artifactId>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment