diff options
author | moberhuber | 2008-07-28 15:23:10 +0000 |
---|---|---|
committer | moberhuber | 2008-07-28 15:23:10 +0000 |
commit | e379cbbce1c7d278be7c479b23f6d1b69873c7e3 (patch) | |
tree | 16e43b945db1359898d7c0269c48ea76e5a387cd /examples | |
parent | 25d752a04f626e4ec61f52b3161993ec40f6c55f (diff) | |
download | org.eclipse.tcf-e379cbbce1c7d278be7c479b23f6d1b69873c7e3.tar.gz org.eclipse.tcf-e379cbbce1c7d278be7c479b23f6d1b69873c7e3.tar.xz org.eclipse.tcf-e379cbbce1c7d278be7c479b23f6d1b69873c7e3.zip |
EPL to EPL+EDL for Daytime Agent Example
Diffstat (limited to 'examples')
5 files changed, 119 insertions, 20 deletions
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html b/examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html new file mode 100644 index 000000000..537125504 --- /dev/null +++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html @@ -0,0 +1,31 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>July 28, 2008</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"), and the Eclipse Distribution License +Version 1.0 ("EDL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +A copy of the EDL is available +at <a href="http://www.eclipse.org/org/documents/edl-v10.php">http://www.eclipse.org/org/documents/edl-v10.php</a>. +For purposes of the EPL and the EDL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL and EDL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html>
\ No newline at end of file diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h b/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h index 1f424d0c1..fbaaa834c 100644 --- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h +++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h @@ -1,10 +1,13 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ @@ -12,7 +15,7 @@ /* * This file contains "define" statements that control agent configuration. * SERVICE_* definitions control which service implementations are included into the agent. - * + * * This is example agent configuration. It includes only few standard services, * and one example service: Day Time. */ diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c b/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c index c98ba7318..4332b2edb 100644 --- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c +++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c @@ -1,10 +1,13 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ @@ -25,21 +28,21 @@ static void command_get_time_of_day(char * token, Channel * c) { char str[0x100]; char res[0x100]; time_t t; - + // Read command argumnet: string TZ - time zone name json_read_string(&c->inp, str, sizeof(str)); // Each JSON encoded argument should end with zero byte if (c->inp.read(&c->inp) != 0) exception(ERR_JSON_SYNTAX); // Done reading arguments. - // The command message should end with MARKER_EOM (End Of Message) + // The command message should end with MARKER_EOM (End Of Message) if (c->inp.read(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX); - + // Execute the command: retrieve current time as a string. // Note: we ignore command argument for simplicity, // a real command handler should do something better then that. time(&t); strcpy(res, ctime(&t)); - + // Start reply message with zero terminated string "R" write_stringz(&c->out, "R"); // Send back the command token diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h b/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h index 93ef222f3..12645d267 100644 --- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h +++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h @@ -1,10 +1,13 @@ /******************************************************************************* * Copyright (c) 2008 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html b/examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html new file mode 100644 index 000000000..01a267187 --- /dev/null +++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. </li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. </li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. </li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +</body> + +</html> |