examples: rename ubuntu to daemon and split provider
Change-Id: Id8222ae3709cab2008ff9032f1bbf252c6d83820
Reviewed-on: https://weave-review.googlesource.com/1323
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Reviewed-by: Johan Euphrosine <proppy@google.com>
diff --git a/libweave/examples/ubuntu/build.sh b/libweave/examples/build.sh
similarity index 82%
rename from libweave/examples/ubuntu/build.sh
rename to libweave/examples/build.sh
index cc585cb..2bd398ef 100755
--- a/libweave/examples/ubuntu/build.sh
+++ b/libweave/examples/build.sh
@@ -4,11 +4,11 @@
# found in the LICENSE file.
DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
-ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/../.." && pwd -P)
+ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
cd $ROOT_DIR
-gyp -Ilibweave_common.gypi --toplevel-dir=. --depth=. -f ninja $DIR/weave.gyp
+gyp -Ilibweave_common.gypi --toplevel-dir=. --depth=. -f ninja $DIR/daemon/daemon.gyp
if [ -z "$BUILD_CONFIG" ]; then
export BUILD_CONFIG=Debug
@@ -16,7 +16,7 @@
export BUILD_TARGET=$*
if [ -z "$BUILD_TARGET" ]; then
- export BUILD_TARGET="weave libweave_testrunner libweave_exports_testrunner"
+ export BUILD_TARGET="weave_daemon libweave_testrunner libweave_exports_testrunner"
fi
export CORES=`cat /proc/cpuinfo | grep processor | wc -l`
diff --git a/libweave/examples/ubuntu/README b/libweave/examples/daemon/README
similarity index 94%
rename from libweave/examples/ubuntu/README
rename to libweave/examples/daemon/README
index af67036..48a4e95 100644
--- a/libweave/examples/ubuntu/README
+++ b/libweave/examples/daemon/README
@@ -5,9 +5,9 @@
Building
--------
- prepare environment
- examples/ubuntu/prerequisites.sh
+ examples/prerequisites.sh
- build daemon
- examples/ubuntu/build.sh
+ examples/build.sh
- binaries for daemon is at
out/Debug/weave
@@ -48,7 +48,7 @@
------------------------
- copy the ticket "id" generated above
93019287-6b26-04a0-22ee-d55ad23a4226
- - go to ubuntu terminal, register ubuntu and start daemon with
+ - go to terminal, register and start the daemon with
sudo out/Debug/weave --registration_ticket=93019287-6b26-04a0-22ee-d55ad23a4226
@@ -75,8 +75,8 @@
chrome: https://chrome.google.com/webstore/detail/weave-device-manager/pcdgflbjckpjmlofgopidgdfonmnodfm
[need your whitelisted EAP account]
-Send Command to Ubuntu Device
------------------------------
+Send Command to the Daemon
+--------------------------
- go to the oauthplayground used for registration ticket command
in "Step 3", send base.identify with
HTTP Method: POST
diff --git a/libweave/examples/daemon/daemon.gyp b/libweave/examples/daemon/daemon.gyp
new file mode 100644
index 0000000..f421601
--- /dev/null
+++ b/libweave/examples/daemon/daemon.gyp
@@ -0,0 +1,18 @@
+# Copyright 2015 The Weave Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'targets': [
+ {
+ 'target_name': 'weave_daemon',
+ 'type': 'executable',
+ 'sources': [
+ 'main.cc',
+ ],
+ 'dependencies': [
+ '../../libweave_standalone.gyp:libweave',
+ '../provider/provider.gyp:libweave_provider',
+ ]
+ }
+ ]
+}
diff --git a/libweave/examples/ubuntu/main.cc b/libweave/examples/daemon/main.cc
similarity index 95%
rename from libweave/examples/ubuntu/main.cc
rename to libweave/examples/daemon/main.cc
index fa1901e..5adff7b 100644
--- a/libweave/examples/ubuntu/main.cc
+++ b/libweave/examples/daemon/main.cc
@@ -9,14 +9,14 @@
#include <weave/device.h>
#include <weave/error.h>
-#include "examples/ubuntu/avahi_client.h"
-#include "examples/ubuntu/bluez_client.h"
-#include "examples/ubuntu/curl_http_client.h"
-#include "examples/ubuntu/event_http_server.h"
-#include "examples/ubuntu/event_network.h"
-#include "examples/ubuntu/event_task_runner.h"
-#include "examples/ubuntu/file_config_store.h"
-#include "examples/ubuntu/wifi_manager.h"
+#include "examples/provider/avahi_client.h"
+#include "examples/provider/bluez_client.h"
+#include "examples/provider/curl_http_client.h"
+#include "examples/provider/event_http_server.h"
+#include "examples/provider/event_network.h"
+#include "examples/provider/event_task_runner.h"
+#include "examples/provider/file_config_store.h"
+#include "examples/provider/wifi_manager.h"
namespace {
diff --git a/libweave/examples/ubuntu/prerequisites.sh b/libweave/examples/prerequisites.sh
similarity index 96%
rename from libweave/examples/ubuntu/prerequisites.sh
rename to libweave/examples/prerequisites.sh
index bc70fd3..d1661d0 100755
--- a/libweave/examples/ubuntu/prerequisites.sh
+++ b/libweave/examples/prerequisites.sh
@@ -4,7 +4,7 @@
# found in the LICENSE file.
DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
-ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/../.." && pwd -P)
+ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
sudo apt-get install ${APT_GET_OPTS} \
autoconf \
diff --git a/libweave/examples/ubuntu/avahi_client.cc b/libweave/examples/provider/avahi_client.cc
similarity index 98%
rename from libweave/examples/ubuntu/avahi_client.cc
rename to libweave/examples/provider/avahi_client.cc
index 3bc1823..18ad555 100644
--- a/libweave/examples/ubuntu/avahi_client.cc
+++ b/libweave/examples/provider/avahi_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/avahi_client.h"
+#include "examples/provider/avahi_client.h"
#include <cstdlib>
#include <vector>
diff --git a/libweave/examples/ubuntu/avahi_client.h b/libweave/examples/provider/avahi_client.h
similarity index 88%
rename from libweave/examples/ubuntu/avahi_client.h
rename to libweave/examples/provider/avahi_client.h
index 64e0eb1..0ca28db 100644
--- a/libweave/examples/ubuntu/avahi_client.h
+++ b/libweave/examples/provider/avahi_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_AVAHI_CLIENT_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_AVAHI_CLIENT_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_AVAHI_CLIENT_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_AVAHI_CLIENT_H_
#include <map>
#include <string>
@@ -44,4 +44,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_AVAHI_CLIENT_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_AVAHI_CLIENT_H_
diff --git a/libweave/examples/ubuntu/bluez_client.cc b/libweave/examples/provider/bluez_client.cc
similarity index 87%
rename from libweave/examples/ubuntu/bluez_client.cc
rename to libweave/examples/provider/bluez_client.cc
index 35defde..5342bcb 100644
--- a/libweave/examples/ubuntu/bluez_client.cc
+++ b/libweave/examples/provider/bluez_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/bluez_client.h"
+#include "examples/provider/bluez_client.h"
namespace weave {
namespace examples {
diff --git a/libweave/examples/ubuntu/bluez_client.h b/libweave/examples/provider/bluez_client.h
similarity index 74%
rename from libweave/examples/ubuntu/bluez_client.h
rename to libweave/examples/provider/bluez_client.h
index e0bc2f2..922f325 100644
--- a/libweave/examples/ubuntu/bluez_client.h
+++ b/libweave/examples/provider/bluez_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_BLUEZ_CLIENT_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_BLUEZ_CLIENT_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_BLUEZ_CLIENT_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_BLUEZ_CLIENT_H_
#include <weave/provider/bluetooth.h>
@@ -21,4 +21,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_BLUEZ_CLIENT_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_BLUEZ_CLIENT_H_
diff --git a/libweave/examples/ubuntu/curl_http_client.cc b/libweave/examples/provider/curl_http_client.cc
similarity index 98%
rename from libweave/examples/ubuntu/curl_http_client.cc
rename to libweave/examples/provider/curl_http_client.cc
index 0ddf57a..36ddf8f 100644
--- a/libweave/examples/ubuntu/curl_http_client.cc
+++ b/libweave/examples/provider/curl_http_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/curl_http_client.h"
+#include "examples/provider/curl_http_client.h"
#include <base/bind.h>
#include <curl/curl.h>
diff --git a/libweave/examples/ubuntu/curl_http_client.h b/libweave/examples/provider/curl_http_client.h
similarity index 85%
rename from libweave/examples/ubuntu/curl_http_client.h
rename to libweave/examples/provider/curl_http_client.h
index daf9b0c..b2f4bca 100644
--- a/libweave/examples/ubuntu/curl_http_client.h
+++ b/libweave/examples/provider/curl_http_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_CURL_HTTP_CLIENT_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_CURL_HTTP_CLIENT_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_CURL_HTTP_CLIENT_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_CURL_HTTP_CLIENT_H_
#include <string>
@@ -39,4 +39,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_CURL_HTTP_CLIENT_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_CURL_HTTP_CLIENT_H_
diff --git a/libweave/examples/ubuntu/event_http_client.cc b/libweave/examples/provider/event_http_client.cc
similarity index 97%
rename from libweave/examples/ubuntu/event_http_client.cc
rename to libweave/examples/provider/event_http_client.cc
index 22b68f2..b38bd55 100644
--- a/libweave/examples/ubuntu/event_http_client.cc
+++ b/libweave/examples/provider/event_http_client.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/event_http_client.h"
-#include "examples/ubuntu/event_task_runner.h"
+#include "examples/provider/event_http_client.h"
+#include "examples/provider/event_task_runner.h"
#include <weave/enum_to_string.h>
diff --git a/libweave/examples/ubuntu/event_http_client.h b/libweave/examples/provider/event_http_client.h
similarity index 83%
rename from libweave/examples/ubuntu/event_http_client.h
rename to libweave/examples/provider/event_http_client.h
index 6ec2db6..7ad117e 100644
--- a/libweave/examples/ubuntu/event_http_client.h
+++ b/libweave/examples/provider/event_http_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_EVENT_HTTP_CLIENT_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_EVENT_HTTP_CLIENT_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_EVENT_HTTP_CLIENT_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_EVENT_HTTP_CLIENT_H_
#include <string>
@@ -35,4 +35,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_EVENT_HTTP_CLIENT_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_EVENT_HTTP_CLIENT_H_
diff --git a/libweave/examples/ubuntu/event_http_server.cc b/libweave/examples/provider/event_http_server.cc
similarity index 98%
rename from libweave/examples/ubuntu/event_http_server.cc
rename to libweave/examples/provider/event_http_server.cc
index 95fea21..d12f2eb 100644
--- a/libweave/examples/ubuntu/event_http_server.cc
+++ b/libweave/examples/provider/event_http_server.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/event_http_server.h"
+#include "examples/provider/event_http_server.h"
#include <vector>
@@ -11,7 +11,7 @@
#include <event2/bufferevent_ssl.h>
#include <openssl/err.h>
-#include "examples/ubuntu/event_task_runner.h"
+#include "examples/provider/event_task_runner.h"
namespace weave {
namespace examples {
diff --git a/libweave/examples/ubuntu/event_http_server.h b/libweave/examples/provider/event_http_server.h
similarity index 93%
rename from libweave/examples/ubuntu/event_http_server.h
rename to libweave/examples/provider/event_http_server.h
index 4828b72..e51c6f4 100644
--- a/libweave/examples/ubuntu/event_http_server.h
+++ b/libweave/examples/provider/event_http_server.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_EVENT_HTTP_SERVER_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_EVENT_HTTP_SERVER_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_EVENT_HTTP_SERVER_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_EVENT_HTTP_SERVER_H_
#include <event2/http.h>
#include <evhttp.h>
@@ -70,4 +70,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_EVENT_HTTP_SERVER_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_EVENT_HTTP_SERVER_H_
diff --git a/libweave/examples/ubuntu/event_network.cc b/libweave/examples/provider/event_network.cc
similarity index 96%
rename from libweave/examples/ubuntu/event_network.cc
rename to libweave/examples/provider/event_network.cc
index ea97251..33e5d12 100644
--- a/libweave/examples/ubuntu/event_network.cc
+++ b/libweave/examples/provider/event_network.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/event_network.h"
+#include "examples/provider/event_network.h"
#include <weave/enum_to_string.h>
@@ -10,8 +10,8 @@
#include <event2/dns.h>
#include <event2/bufferevent.h>
-#include "examples/ubuntu/event_task_runner.h"
-#include "examples/ubuntu/ssl_stream.h"
+#include "examples/provider/event_task_runner.h"
+#include "examples/provider/ssl_stream.h"
namespace weave {
namespace examples {
diff --git a/libweave/examples/ubuntu/event_network.h b/libweave/examples/provider/event_network.h
similarity index 100%
rename from libweave/examples/ubuntu/event_network.h
rename to libweave/examples/provider/event_network.h
diff --git a/libweave/examples/ubuntu/event_task_runner.cc b/libweave/examples/provider/event_task_runner.cc
similarity index 96%
rename from libweave/examples/ubuntu/event_task_runner.cc
rename to libweave/examples/provider/event_task_runner.cc
index b781ff4..c14a934 100644
--- a/libweave/examples/ubuntu/event_task_runner.cc
+++ b/libweave/examples/provider/event_task_runner.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/event_task_runner.h"
+#include "examples/provider/event_task_runner.h"
#include <signal.h>
diff --git a/libweave/examples/ubuntu/event_task_runner.h b/libweave/examples/provider/event_task_runner.h
similarity index 90%
rename from libweave/examples/ubuntu/event_task_runner.h
rename to libweave/examples/provider/event_task_runner.h
index 77d7e72..473441e 100644
--- a/libweave/examples/ubuntu/event_task_runner.h
+++ b/libweave/examples/provider/event_task_runner.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_EVENT_TASK_RUNNER_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_EVENT_TASK_RUNNER_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_EVENT_TASK_RUNNER_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_EVENT_TASK_RUNNER_H_
#include <queue>
#include <utility>
@@ -56,4 +56,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_EVENT_TASK_RUNNER_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_EVENT_TASK_RUNNER_H_
diff --git a/libweave/examples/ubuntu/file_config_store.cc b/libweave/examples/provider/file_config_store.cc
similarity index 97%
rename from libweave/examples/ubuntu/file_config_store.cc
rename to libweave/examples/provider/file_config_store.cc
index d3f10ef..44f2c30 100644
--- a/libweave/examples/ubuntu/file_config_store.cc
+++ b/libweave/examples/provider/file_config_store.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/file_config_store.h"
+#include "examples/provider/file_config_store.h"
#include <sys/stat.h>
#include <sys/utsname.h>
diff --git a/libweave/examples/ubuntu/file_config_store.h b/libweave/examples/provider/file_config_store.h
similarity index 79%
rename from libweave/examples/ubuntu/file_config_store.h
rename to libweave/examples/provider/file_config_store.h
index 1f3d181..e4d16a9 100644
--- a/libweave/examples/ubuntu/file_config_store.h
+++ b/libweave/examples/provider/file_config_store.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_FILE_CONFIG_STORE_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_FILE_CONFIG_STORE_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_
#include <map>
#include <string>
@@ -29,4 +29,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_FILE_CONFIG_STORE_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_FILE_CONFIG_STORE_H_
diff --git a/libweave/examples/provider/provider.gyp b/libweave/examples/provider/provider.gyp
new file mode 100644
index 0000000..9dcf184
--- /dev/null
+++ b/libweave/examples/provider/provider.gyp
@@ -0,0 +1,59 @@
+# Copyright 2015 The Weave Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'targets': [
+ {
+ 'target_name': 'libweave_provider',
+ 'type': 'static_library',
+ 'variables': {
+ 'deps': [
+ 'avahi-client',
+ 'expat',
+ 'libcurl',
+ 'libcrypto',
+ 'openssl',
+ ]
+ },
+ 'cflags': [
+ '>!@(pkg-config >(deps) --cflags)',
+ '-pthread',
+ ],
+ 'sources': [
+ 'avahi_client.cc',
+ 'bluez_client.cc',
+ 'curl_http_client.cc',
+ 'event_http_client.cc',
+ 'event_http_server.cc',
+ 'event_network.cc',
+ 'event_task_runner.cc',
+ 'file_config_store.cc',
+ 'wifi_manager.cc',
+ 'ssl_stream.cc',
+ ],
+ 'dependencies': [
+ '../../libweave_standalone.gyp:libweave',
+ ],
+ 'direct_dependent_settings' : {
+ 'variables': {
+ 'parent_deps': [
+ '<@(deps)'
+ ]
+ },
+ 'link_settings': {
+ 'ldflags+': [
+ '>!@(pkg-config >(parent_deps) --libs-only-L --libs-only-other)',
+ ],
+ 'libraries+': [
+ '>!(pkg-config >(parent_deps) --libs-only-l)',
+ ],
+ },
+ 'libraries': [
+ '-levent',
+ '-levent_openssl',
+ '-lpthread',
+ ]
+ }
+ }
+ ]
+}
diff --git a/libweave/examples/ubuntu/ssl_stream.cc b/libweave/examples/provider/ssl_stream.cc
similarity index 98%
rename from libweave/examples/ubuntu/ssl_stream.cc
rename to libweave/examples/provider/ssl_stream.cc
index 7395c5b..d3cbcfd 100644
--- a/libweave/examples/ubuntu/ssl_stream.cc
+++ b/libweave/examples/provider/ssl_stream.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/ssl_stream.h"
+#include "examples/provider/ssl_stream.h"
#include <base/bind.h>
#include <weave/provider/task_runner.h>
diff --git a/libweave/examples/ubuntu/ssl_stream.h b/libweave/examples/provider/ssl_stream.h
similarity index 88%
rename from libweave/examples/ubuntu/ssl_stream.h
rename to libweave/examples/provider/ssl_stream.h
index ae0e539..ca3731b 100644
--- a/libweave/examples/ubuntu/ssl_stream.h
+++ b/libweave/examples/provider/ssl_stream.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBWEAVE_EXAMPLES_UBUNTU_SSL_STREAM_H_
-#define LIBWEAVE_EXAMPLES_UBUNTU_SSL_STREAM_H_
+#ifndef LIBWEAVE_EXAMPLES_PROVIDER_SSL_STREAM_H_
+#define LIBWEAVE_EXAMPLES_PROVIDER_SSL_STREAM_H_
#include <openssl/ssl.h>
@@ -49,4 +49,4 @@
} // namespace examples
} // namespace weave
-#endif // LIBWEAVE_EXAMPLES_UBUNTU_SSL_STREAM_H_
+#endif // LIBWEAVE_EXAMPLES_PROVIDER_SSL_STREAM_H_
diff --git a/libweave/examples/ubuntu/wifi_manager.cc b/libweave/examples/provider/wifi_manager.cc
similarity index 97%
rename from libweave/examples/ubuntu/wifi_manager.cc
rename to libweave/examples/provider/wifi_manager.cc
index 2df66af..132144c 100644
--- a/libweave/examples/ubuntu/wifi_manager.cc
+++ b/libweave/examples/provider/wifi_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "examples/ubuntu/wifi_manager.h"
+#include "examples/provider/wifi_manager.h"
#include <arpa/inet.h>
#include <linux/wireless.h>
@@ -14,7 +14,7 @@
#include <base/bind.h>
#include <weave/provider/task_runner.h>
-#include "examples/ubuntu/ssl_stream.h"
+#include "examples/provider/ssl_stream.h"
namespace weave {
namespace examples {
diff --git a/libweave/examples/ubuntu/wifi_manager.h b/libweave/examples/provider/wifi_manager.h
similarity index 100%
rename from libweave/examples/ubuntu/wifi_manager.h
rename to libweave/examples/provider/wifi_manager.h
diff --git a/libweave/examples/ubuntu/weave.gyp b/libweave/examples/ubuntu/weave.gyp
deleted file mode 100644
index 24e8f15..0000000
--- a/libweave/examples/ubuntu/weave.gyp
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2015 The Weave Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'weave',
- 'type': 'executable',
- 'variables': {
- 'deps': [
- 'avahi-client',
- 'expat',
- 'libcurl',
- 'libcrypto',
- 'openssl',
- ]
- },
- 'cflags': [
- '>!@(pkg-config >(deps) --cflags)',
- '-pthread',
- ],
- 'link_settings': {
- 'ldflags+': [
- '>!@(pkg-config >(deps) --libs-only-L --libs-only-other)',
- ],
- 'libraries+': [
- '>!(pkg-config >(deps) --libs-only-l)',
- ],
- },
- 'sources': [
- 'avahi_client.cc',
- 'bluez_client.cc',
- 'curl_http_client.cc',
- 'event_http_client.cc',
- 'event_http_server.cc',
- 'event_task_runner.cc',
- 'file_config_store.cc',
- 'main.cc',
- 'event_network.cc',
- 'wifi_manager.cc',
- 'ssl_stream.cc',
- ],
- 'dependencies': [
- '../../libweave_standalone.gyp:libweave',
- ],
- 'libraries': [
- '-levent',
- '-levent_openssl',
- '-lpthread',
- ]
- }
- ]
-}