From b54048ea0461f8c79efcba9667d8f0410bbf6c27 Mon Sep 17 00:00:00 2001
From: Eugene Tarassov
Date: Mon, 14 Nov 2011 10:25:05 -0800
Subject: DayTime agent example is moved into the agent repository
---
.gitignore | 4 -
.../.cproject | 209 ---------------------
.../.project | 81 --------
.../Makefile | 30 ---
.../about.html | 31 ---
.../edl-v10.html | 59 ------
.../readme.txt | 17 --
.../tcf/config.h | 44 -----
.../tcf/main/services-ext.h | 26 ---
.../tcf/services/daytime.c | 68 -------
.../tcf/services/daytime.h | 28 ---
11 files changed, 597 deletions(-)
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/.cproject
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/.project
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/Makefile
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/about.html
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/edl-v10.html
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/readme.txt
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/tcf/config.h
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/tcf/main/services-ext.h
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.c
delete mode 100644 examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.h
diff --git a/.gitignore b/.gitignore
index 9489cef3f..f5c0e671e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,14 +5,10 @@
# .
workspace
debug-workspace
-sync
# examples/org.eclipse.tcf.examples.daytime/
examples/org.eclipse.tcf.examples.daytime/bin
-# examples/org.eclipse.tcf.examples.daytime.agent/
-examples/org.eclipse.tcf.examples.daytime.agent/obj
-
# features/
features/build-directory
features/build-workspace
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/.cproject b/examples/org.eclipse.tcf.examples.daytime.agent/.cproject
deleted file mode 100644
index 48691de2e..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/.cproject
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/.project b/examples/org.eclipse.tcf.examples.daytime.agent/.project
deleted file mode 100644
index 6013a17e0..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/.project
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
- org.eclipse.tcf.examples.daytime.agent
-
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.genmakebuilder
- clean,full,incremental,
-
-
- ?name?
-
-
-
- org.eclipse.cdt.make.core.append_environment
- true
-
-
- org.eclipse.cdt.make.core.autoBuildTarget
- all
-
-
- org.eclipse.cdt.make.core.buildArguments
-
-
-
- org.eclipse.cdt.make.core.buildCommand
- make
-
-
- org.eclipse.cdt.make.core.buildLocation
- ${build_project}
-
-
- org.eclipse.cdt.make.core.cleanBuildTarget
- clean
-
-
- org.eclipse.cdt.make.core.contents
- org.eclipse.cdt.make.core.activeConfigSettings
-
-
- org.eclipse.cdt.make.core.enableAutoBuild
- false
-
-
- org.eclipse.cdt.make.core.enableCleanBuild
- true
-
-
- org.eclipse.cdt.make.core.enableFullBuild
- true
-
-
- org.eclipse.cdt.make.core.fullBuildTarget
- all
-
-
- org.eclipse.cdt.make.core.stopOnError
- true
-
-
- org.eclipse.cdt.make.core.useDefaultBuildCmd
- true
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
-
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
- org.eclipse.cdt.managedbuilder.core.managedBuildNature
- org.eclipse.cdt.core.cnature
-
-
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/Makefile b/examples/org.eclipse.tcf.examples.daytime.agent/Makefile
deleted file mode 100644
index d9a121eb2..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-TCF_AGENT_DIR=../../../org.eclipse.tcf.agent/agent
-
-include $(TCF_AGENT_DIR)/Makefile.inc
-
-override CFLAGS += $(foreach dir,$(INCDIRS),-I$(dir)) $(OPTS)
-
-HFILES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.h)) $(HFILES)
-CFILES := $(sort $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) $(CFILES))
-
-EXECS = $(BINDIR)/agent$(EXTEXE)
-
-all: $(EXECS)
-
-$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
- $(AR) -rc $@ $^
- $(RANLIB)
-
-$(BINDIR)/agent$(EXTEXE): $(BINDIR)/tcf/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
- $(CC) $(CFLAGS) -o $@ $(BINDIR)/tcf/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
-
-$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-clean:
- $(call RMDIR,$(BINDIR))
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/about.html b/examples/org.eclipse.tcf.examples.daytime.agent/about.html
deleted file mode 100644
index 26aa26557..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/about.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-About
-
-
-About This Content
-
-July 28, 2008
-License
-
-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 http://www.eclipse.org/legal/epl-v10.html.
-A copy of the EDL is available
-at http://www.eclipse.org/org/documents/edl-v10.php.
-For purposes of the EPL and the EDL, "Program" will mean the Content.
-
-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 http://www.eclipse.org.
-
-
-
\ No newline at end of file
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/edl-v10.html b/examples/org.eclipse.tcf.examples.daytime.agent/edl-v10.html
deleted file mode 100644
index 58cf7c3f7..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/edl-v10.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-Eclipse Distribution License - Version 1.0
-
-
-
-
-
-
-Eclipse Distribution License - v 1.0
-
-Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
-
-All rights reserved.
-Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-- 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.
-- 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.
-
-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.
-
-
-
-
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/readme.txt b/examples/org.eclipse.tcf.examples.daytime.agent/readme.txt
deleted file mode 100644
index b9c425abc..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/readme.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Readme for TCF Agent Daytime Example
-------------------------------
-
-The Agent Daytime Example shows how TCF agent can be customized and extended with user defined service.
-The example provides code to build the agent with custom set of services, including user defined DayTime service.
-The example is mainly meant for developer's educational use,
-DayTime service does not meant to be of any other value.
-
-See "org.eclipse.tm.tcf.examples.daytime" for details on extending TCF Java binding for DayTime service.
-
-The example includes:
-1. Makefile to build the customized agent.
-2. Implementation of DayTime service: daytime.h daytime.c
-3. Agent configuration header file: config.h
-
-CDT can be used to edit and build the example project.
-Supported agent execution environments: CygWin, Linux.
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/config.h b/examples/org.eclipse.tcf.examples.daytime.agent/tcf/config.h
deleted file mode 100644
index b4ba0cb72..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/config.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * 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
- * 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.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * 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.
- */
-
-#ifndef D_config
-#define D_config
-
-#include
-
-#if defined(WIN32) || defined(__CYGWIN__)
-# define TARGET_UNIX 0
-#elif defined(_WRS_KERNEL)
-# define TARGET_UNIX 0
-#else
-# define TARGET_UNIX 1
-#endif
-
-#define SERVICE_FileSystem 1
-#define SERVICE_SysMonitor TARGET_UNIX
-
-#define ENABLE_Trace 1
-#define ENABLE_Discovery 1
-
-
-#endif /* D_config */
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/main/services-ext.h b/examples/org.eclipse.tcf.examples.daytime.agent/tcf/main/services-ext.h
deleted file mode 100644
index 00083d39a..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/main/services-ext.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 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
- * 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.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Services initialization code extension point.
- * If the agent is built with additional user-defined services,
- * a customized version of services-ext.h file can be added to compiler headers search paths.
- */
-
-#include
-
-static void ini_ext_services(Protocol * proto, TCFBroadcastGroup * bcg) {
- ini_daytime_service(proto);
-}
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.c b/examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.c
deleted file mode 100644
index c4108038e..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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
- * 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.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Sample TCF service implementation.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-static const char * DAYTIME = "Daytime";
-
-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)
- 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
- write_stringz(&c->out, token);
- // Send error report, for now always "no error"
- write_errno(&c->out, 0);
- // Send reply data
- json_write_string(&c->out, res);
- // JSON encoded data should end with zero byte
- c->out.write(&c->out, 0);
- // Done sending reply data.
- // The reply message should end with MARKER_EOM (End Of Message)
- c->out.write(&c->out, MARKER_EOM);
- // Done sending reply message.
- // Command handling is complete.
-}
-
-void ini_daytime_service(Protocol * proto) {
- // Install command handler
- add_command_handler(proto, DAYTIME, "getTimeOfDay", command_get_time_of_day);
-}
diff --git a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.h b/examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.h
deleted file mode 100644
index 492544d76..000000000
--- a/examples/org.eclipse.tcf.examples.daytime.agent/tcf/services/daytime.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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
- * 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.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Sample TCF service header file.
- */
-
-#ifndef DAYTIME_H_
-#define DAYTIME_H_
-
-#include
-#include
-
-extern void ini_daytime_service(Protocol * proto);
-
-#endif /*DAYTIME_H_*/
--
cgit v1.2.3