Merge lp:~marcustomlinson/unity-scopes-api/rename_child_scopes_methods into lp:unity-scopes-api
- rename_child_scopes_methods
- Merge into trunk
Proposed by
Marcus Tomlinson
Status: | Merged |
---|---|
Approved by: | Paweł Stołowski |
Approved revision: | 324 |
Merged at revision: | 321 |
Proposed branch: | lp:~marcustomlinson/unity-scopes-api/rename_child_scopes_methods |
Merge into: | lp:unity-scopes-api |
Diff against target: |
882 lines (+145/-132) 30 files modified
CMakeLists.txt (+1/-1) RELEASE_NOTES.md (+5/-0) debian/changelog (+7/-0) debian/libunity-scopes3.symbols (+8/-8) include/unity/scopes/AbstractScopeBase.h (+1/-1) include/unity/scopes/Scope.h (+6/-6) include/unity/scopes/ScopeBase.h (+14/-13) include/unity/scopes/internal/ChildScopesRepository.h (+2/-2) include/unity/scopes/internal/MWScope.h (+2/-2) include/unity/scopes/internal/ScopeBaseImpl.h (+3/-3) include/unity/scopes/internal/ScopeImpl.h (+2/-2) include/unity/scopes/internal/ScopeObject.h (+2/-2) include/unity/scopes/internal/ScopeObjectBase.h (+2/-2) include/unity/scopes/internal/smartscopes/SSScopeObject.h (+2/-2) include/unity/scopes/internal/zmq_middleware/ScopeI.h (+2/-2) include/unity/scopes/internal/zmq_middleware/ZmqScope.h (+2/-2) include/unity/scopes/testing/MockScope.h (+2/-2) src/scopes/ScopeBase.cpp (+6/-6) src/scopes/internal/ChildScopesRepository.cpp (+3/-3) src/scopes/internal/ScopeBaseImpl.cpp (+7/-7) src/scopes/internal/ScopeImpl.cpp (+4/-4) src/scopes/internal/ScopeObject.cpp (+4/-4) src/scopes/internal/smartscopes/SSScopeObject.cpp (+2/-2) src/scopes/internal/zmq_middleware/ScopeI.cpp (+13/-13) src/scopes/internal/zmq_middleware/ZmqScope.cpp (+11/-11) src/scopes/internal/zmq_middleware/capnproto/Scope.capnp (+4/-4) test/gtest/scopes/ChildScopes/ChildScopes_test.cpp (+20/-20) test/gtest/scopes/ChildScopes/TestScope.h (+4/-4) test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp (+2/-2) test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp (+2/-2) |
To merge this branch: | bzr merge lp:~marcustomlinson/unity-scopes-api/rename_child_scopes_methods |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paweł Stołowski (community) | Approve | ||
Michi Henning (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+254035@code.launchpad.net |
Commit message
Rename "child_scopes()" to "find_child_
Description of the change
To post a comment you must log in.
- 324. By Marcus Tomlinson
-
Insert 0replaceme for new symbols
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote : | # |
Do we want to target this to unity-scopes-api or to devel?
Also, the change is ABI-incompatible. Just saying'… ;-)
Otherwise, looks fine, seeing that it's just a straight renaming.
review:
Approve
Revision history for this message
Paweł Stołowski (stolowski) wrote : | # |
Should be targeted at devel. Otherwise looks good.
review:
Needs Fixing
Revision history for this message
Paweł Stołowski (stolowski) wrote : | # |
Confusion around landing... trunk is OK as we want that in vivid now. +1
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2015-02-13 09:20:20 +0000 |
3 | +++ CMakeLists.txt 2015-03-25 07:00:14 +0000 |
4 | @@ -227,7 +227,7 @@ |
5 | # API version |
6 | set(UNITY_SCOPES_MAJOR 0) |
7 | set(UNITY_SCOPES_MINOR 6) |
8 | -set(UNITY_SCOPES_MICRO 14) |
9 | +set(UNITY_SCOPES_MICRO 15) |
10 | set(UNITY_SCOPES_SOVERSION 3) |
11 | |
12 | # Version for testing, with all symbols visible |
13 | |
14 | === modified file 'RELEASE_NOTES.md' |
15 | --- RELEASE_NOTES.md 2015-02-13 09:20:20 +0000 |
16 | +++ RELEASE_NOTES.md 2015-03-25 07:00:14 +0000 |
17 | @@ -1,6 +1,11 @@ |
18 | Release notes |
19 | ============= |
20 | |
21 | +Changes in version 0.6.15 |
22 | +========================= |
23 | + - Renamed "child_scopes()" to "find_child_scopes()" |
24 | + - Renamed "child_scopes_ordered()" to "child_scopes()" |
25 | + |
26 | Changes in version 0.6.14 |
27 | ========================= |
28 | - Added push_surfacing_results_from_cache() to Reply proxy. This allows a scope |
29 | |
30 | === modified file 'debian/changelog' |
31 | --- debian/changelog 2015-02-23 14:48:28 +0000 |
32 | +++ debian/changelog 2015-03-25 07:00:14 +0000 |
33 | @@ -1,3 +1,10 @@ |
34 | +unity-scopes-api (0.6.15-0ubuntu1) UNRELEASED; urgency=medium |
35 | + |
36 | + * Renamed "child_scopes()" to "find_child_scopes()" |
37 | + * Renamed "child_scopes_ordered()" to "child_scopes()" |
38 | + |
39 | + -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Wed, 25 Mar 2015 08:26:17 +0200 |
40 | + |
41 | unity-scopes-api (0.6.14+15.04.20150223-0ubuntu1) vivid; urgency=medium |
42 | |
43 | [ Pawel Stolowski ] |
44 | |
45 | === modified file 'debian/libunity-scopes3.symbols' |
46 | --- debian/libunity-scopes3.symbols 2015-02-13 10:36:25 +0000 |
47 | +++ debian/libunity-scopes3.symbols 2015-03-25 07:00:14 +0000 |
48 | @@ -475,7 +475,7 @@ |
49 | (c++)"unity::scopes::internal::ScopeConfig::search_hint() const@Base" 0.4.0+14.04.20140312.1 |
50 | (c++)"unity::scopes::internal::ScopeConfig::version() const@Base" 0.6.9+15.04.20141129 |
51 | (c++)"unity::scopes::internal::ScopeImpl::activate(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::shared_ptr<unity::scopes::ActivationListenerBase> const&)@Base" 0.4.0+14.04.20140312.1 |
52 | - (c++)"unity::scopes::internal::ScopeImpl::child_scopes_ordered()@Base" 0.6.12+15.04.20150127.2 |
53 | + (c++)"unity::scopes::internal::ScopeImpl::child_scopes()@Base" 0replaceme |
54 | (c++)"unity::scopes::internal::ScopeImpl::create(std::shared_ptr<unity::scopes::internal::MWScope> const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.6.11+15.04.20150119 |
55 | (c++)"unity::scopes::internal::ScopeImpl::fwd()@Base" 0.4.3+14.10.20140428 |
56 | (c++)"unity::scopes::internal::ScopeImpl::perform_action(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<unity::scopes::ActivationListenerBase> const&)@Base" 0.4.0+14.04.20140312.1 |
57 | @@ -488,7 +488,7 @@ |
58 | (c++)"unity::scopes::internal::ScopeImpl::search(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unity::scopes::FilterState const&, unity::scopes::SearchMetadata const&, std::shared_ptr<unity::scopes::SearchListenerBase> const&)@Base" 0.4.0+14.04.20140312.1 |
59 | (c++)"unity::scopes::internal::ScopeImpl::search(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unity::scopes::SearchMetadata const&, std::shared_ptr<unity::scopes::SearchListenerBase> const&)@Base" 0.4.0+14.04.20140312.1 |
60 | (c++)"unity::scopes::internal::ScopeImpl::search(unity::scopes::CannedQuery const&, unity::scopes::SearchMetadata const&, std::vector<std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::shared_ptr<unity::scopes::SearchListenerBase> const&)@Base" 0.6.12+15.04.20150127.2 |
61 | - (c++)"unity::scopes::internal::ScopeImpl::set_child_scopes_ordered(std::list<unity::scopes::ChildScope, std::allocator<unity::scopes::ChildScope> > const&)@Base" 0.6.12+15.04.20150127.2 |
62 | + (c++)"unity::scopes::internal::ScopeImpl::set_child_scopes(std::list<unity::scopes::ChildScope, std::allocator<unity::scopes::ChildScope> > const&)@Base" 0replaceme |
63 | (c++)"unity::scopes::internal::ScopeLoader::libpath() const@Base" 0.4.0+14.04.20140312.1 |
64 | (c++)"unity::scopes::internal::ScopeLoader::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.6.0+14.10.20140804.1 |
65 | (c++)"unity::scopes::internal::ScopeLoader::scope_base() const@Base" 0.4.0+14.04.20140312.1 |
66 | @@ -544,7 +544,7 @@ |
67 | (c++)"unity::scopes::internal::ScopeMetadataImpl::set_version(int)@Base" 0.6.9+15.04.20141129 |
68 | (c++)"unity::scopes::internal::ScopeMetadataImpl::version() const@Base" 0.6.9+15.04.20141129 |
69 | (c++)"unity::scopes::internal::ScopeObject::activate(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.4.0+14.04.20140312.1 |
70 | - (c++)"unity::scopes::internal::ScopeObject::child_scopes_ordered() const@Base" 0.6.12+15.04.20150127.2 |
71 | + (c++)"unity::scopes::internal::ScopeObject::child_scopes() const@Base" 0replaceme |
72 | (c++)"unity::scopes::internal::ScopeObject::debug_mode() const@Base" 0.6.2+rtm+rtm+rtm+14.09.20140818 |
73 | (c++)"unity::scopes::internal::ScopeObject::perform_action(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.4.0+14.04.20140312.1 |
74 | (c++)"unity::scopes::internal::ScopeObject::preview(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.4.0+14.04.20140312.1 |
75 | @@ -552,7 +552,7 @@ |
76 | (c++)"unity::scopes::internal::ScopeObject::~ScopeObject()@Base" 0.4.0+14.04.20140312.1 |
77 | (c++)"unity::scopes::internal::ScopeObject::ScopeObject(unity::scopes::ScopeBase*, bool)@Base" 0.6.12+15.04.20150127.2 |
78 | (c++)"unity::scopes::internal::ScopeObject::search(unity::scopes::CannedQuery const&, unity::scopes::SearchMetadata const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unity::scopes::Variant, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, unity::scopes::Variant> > > const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.6.12+15.04.20150127.2 |
79 | - (c++)"unity::scopes::internal::ScopeObject::set_child_scopes_ordered(std::list<unity::scopes::ChildScope, std::allocator<unity::scopes::ChildScope> > const&)@Base" 0.6.12+15.04.20150127.2 |
80 | + (c++)"unity::scopes::internal::ScopeObject::set_child_scopes(std::list<unity::scopes::ChildScope, std::allocator<unity::scopes::ChildScope> > const&)@Base" 0replaceme |
81 | (c++)"unity::scopes::internal::smartscopes::SSConfig::http_reply_timeout() const@Base" 0.4.4+14.10.20140508 |
82 | (c++)"unity::scopes::internal::smartscopes::SSConfig::reg_refresh_fail_timeout() const@Base" 0.4.4+14.10.20140508 |
83 | (c++)"unity::scopes::internal::smartscopes::SSConfig::reg_refresh_rate() const@Base" 0.4.4+14.10.20140508 |
84 | @@ -574,13 +574,13 @@ |
85 | (c++)"unity::scopes::internal::smartscopes::SSRegistryObject::SSRegistryObject(std::shared_ptr<unity::scopes::internal::MiddlewareBase>, unity::scopes::internal::smartscopes::SSConfig const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)@Base" 0.4.4+14.10.20140508 |
86 | (c++)"unity::scopes::internal::smartscopes::SSRegistryObject::SSSettingsDef::~SSSettingsDef()@Base" 0.5.2+14.10.20140709.2 |
87 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::activate(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.4.0+14.04.20140312.1 |
88 | - (c++)"unity::scopes::internal::smartscopes::SSScopeObject::child_scopes_ordered() const@Base" 0.6.12+15.04.20150127.2 |
89 | + (c++)"unity::scopes::internal::smartscopes::SSScopeObject::child_scopes() const@Base" 0replaceme |
90 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::debug_mode() const@Base" 0.6.2+rtm+rtm+rtm+14.09.20140818 |
91 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::perform_action(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.4.0+14.04.20140312.1 |
92 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::preview(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.4.0+14.04.20140312.1 |
93 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::query(unity::scopes::internal::InvokeInfo const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, std::function<std::shared_ptr<unity::scopes::QueryBase> ()> const&, std::function<void (std::shared_ptr<unity::scopes::QueryBase>)> const&)@Base" 0.4.0+14.04.20140312.1 |
94 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::search(unity::scopes::CannedQuery const&, unity::scopes::SearchMetadata const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unity::scopes::Variant, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, unity::scopes::Variant> > > const&, std::shared_ptr<unity::scopes::internal::MWReply> const&, unity::scopes::internal::InvokeInfo const&)@Base" 0.6.12+15.04.20150127.2 |
95 | - (c++)"unity::scopes::internal::smartscopes::SSScopeObject::set_child_scopes_ordered(std::list<unity::scopes::ChildScope, std::allocator<unity::scopes::ChildScope> > const&)@Base" 0.6.12+15.04.20150127.2 |
96 | + (c++)"unity::scopes::internal::smartscopes::SSScopeObject::set_child_scopes(std::list<unity::scopes::ChildScope, std::allocator<unity::scopes::ChildScope> > const&)@Base" 0replaceme |
97 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::~SSScopeObject()@Base" 0.4.0+14.04.20140312.1 |
98 | (c++)"unity::scopes::internal::smartscopes::SSScopeObject::SSScopeObject(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<unity::scopes::internal::MiddlewareBase>, std::shared_ptr<unity::scopes::internal::smartscopes::SSRegistryObject>)@Base" 0.4.0+14.04.20140312.1 |
99 | (c++)"unity::scopes::internal::StateReceiverObject::push_state(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unity::scopes::internal::StateReceiverObject::State const&)@Base" 0.4.2+14.04.20140404.2 |
100 | @@ -780,8 +780,8 @@ |
101 | (c++)"unity::scopes::ScopeBase::activate(unity::scopes::Result const&, unity::scopes::ActionMetadata const&)@Base" 0.4.0+14.04.20140312.1 |
102 | (c++)"unity::scopes::ScopeBase::app_directory() const@Base" 0.6.9+15.04.20141129 |
103 | (c++)"unity::scopes::ScopeBase::cache_directory() const@Base" 0.6.0+14.10.20140804.1 |
104 | - (c++)"unity::scopes::ScopeBase::child_scopes() const@Base" 0.6.12+15.04.20150127.2 |
105 | - (c++)"unity::scopes::ScopeBase::child_scopes_ordered() const@Base" 0.6.12+15.04.20150127.2 |
106 | + (c++)"unity::scopes::ScopeBase::child_scopes() const@Base" 0replaceme |
107 | + (c++)"unity::scopes::ScopeBase::find_child_scopes() const@Base" 0replaceme |
108 | (c++)"unity::scopes::ScopeBase::perform_action(unity::scopes::Result const&, unity::scopes::ActionMetadata const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.4.0+14.04.20140312.1 |
109 | (c++)"unity::scopes::ScopeBase::registry() const@Base" 0.6.0+14.10.20140804.1 |
110 | (c++)"unity::scopes::ScopeBase::run()@Base" 0.4.0+14.04.20140312.1 |
111 | |
112 | === modified file 'include/unity/scopes/AbstractScopeBase.h' |
113 | --- include/unity/scopes/AbstractScopeBase.h 2015-01-26 08:10:59 +0000 |
114 | +++ include/unity/scopes/AbstractScopeBase.h 2015-03-25 07:00:14 +0000 |
115 | @@ -59,8 +59,8 @@ |
116 | |
117 | virtual ~AbstractScopeBase(); |
118 | |
119 | + virtual ChildScopeList find_child_scopes() const = 0; |
120 | virtual ChildScopeList child_scopes() const = 0; |
121 | - virtual ChildScopeList child_scopes_ordered() const = 0; |
122 | |
123 | protected: |
124 | AbstractScopeBase(); |
125 | |
126 | === modified file 'include/unity/scopes/Scope.h' |
127 | --- include/unity/scopes/Scope.h 2015-01-15 04:56:00 +0000 |
128 | +++ include/unity/scopes/Scope.h 2015-03-25 07:00:14 +0000 |
129 | @@ -142,19 +142,19 @@ |
130 | virtual ~Scope(); |
131 | |
132 | /** |
133 | - \brief Returns a list of child scopes aggregated by this scope in user-defined order. |
134 | - \return The list of child scopes aggregated by this scope in user-defined order. |
135 | + \brief Returns a list of child scopes aggregated by this scope. |
136 | + \return The list of child scopes aggregated by this scope. |
137 | */ |
138 | - virtual ChildScopeList child_scopes_ordered() = 0; |
139 | + virtual ChildScopeList child_scopes() = 0; |
140 | |
141 | /** |
142 | - \brief Sets the ordered list of child scopes aggregated by this scope. |
143 | + \brief Sets the list of child scopes aggregated by this scope. |
144 | \note The only time this call will return false is if the scope cannot write to its config directory. |
145 | This should not happen in real-world usage, but if it does, check the log for more detail. |
146 | - \param child_scopes_ordered The ordered list of child scopes aggregated by this scope. |
147 | + \param child_scopes The list of child scopes aggregated by this scope. |
148 | \return True if the list was successfully set. |
149 | */ |
150 | - virtual bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) = 0; |
151 | + virtual bool set_child_scopes(ChildScopeList const& child_scopes) = 0; |
152 | |
153 | protected: |
154 | /// @cond |
155 | |
156 | === modified file 'include/unity/scopes/ScopeBase.h' |
157 | --- include/unity/scopes/ScopeBase.h 2015-01-26 08:10:59 +0000 |
158 | +++ include/unity/scopes/ScopeBase.h 2015-03-25 07:00:14 +0000 |
159 | @@ -331,31 +331,32 @@ |
160 | virtual VariantMap settings() const final; |
161 | |
162 | /** |
163 | - \brief Returns a list of child scopes aggregated by this scope. |
164 | + \brief Returns a defaulted list of child scopes aggregated by this scope. |
165 | |
166 | The scope author must ensure that the list returned by this method contains all scopes |
167 | - that this aggregator may collect results from. This list may contain scopes that are |
168 | - not currently installed and are optional for proper functioning of this scope. |
169 | + that this aggregator may collect results from. The "enabled" state for each child |
170 | + returned should be set to a default value (i.e. whether the child is enabled or |
171 | + disabled by default when newly discovered). |
172 | |
173 | The default behaviour of this method is to simply return all available scopes on the |
174 | - system. This translates to: "Any scope may potentially be aggregated by this scope". |
175 | + system in disabled state. This translates to: "Any scope may potentially be aggregated |
176 | + by this scope". |
177 | |
178 | \note Only aggregator scopes should implement this method. |
179 | |
180 | \return The list of child scopes aggregated by this scope. |
181 | */ |
182 | - virtual ChildScopeList child_scopes() const; |
183 | + virtual ChildScopeList find_child_scopes() const; |
184 | |
185 | /** |
186 | - \brief Returns a list of child scopes aggregated by this scope in user-defined order. |
187 | - |
188 | - An aggregator scope must push its results in the order specified by this method's |
189 | - return value. The aggregator should also respect the "enabled" states of each child |
190 | - scope, returning results only for the child scopes that are enabled. |
191 | - |
192 | - \return The list of child scopes aggregated by this scope in user-defined order. |
193 | + \brief Returns the current list of child scopes aggregated by this scope. |
194 | + |
195 | + An aggregator should respect the "enabled" states of each child scope, returning |
196 | + results only for the child scopes that are enabled. |
197 | + |
198 | + \return The list of child scopes aggregated by this scope. |
199 | */ |
200 | - virtual ChildScopeList child_scopes_ordered() const final; |
201 | + virtual ChildScopeList child_scopes() const final; |
202 | |
203 | protected: |
204 | /// @cond |
205 | |
206 | === modified file 'include/unity/scopes/internal/ChildScopesRepository.h' |
207 | --- include/unity/scopes/internal/ChildScopesRepository.h 2014-12-18 06:03:42 +0000 |
208 | +++ include/unity/scopes/internal/ChildScopesRepository.h 2015-03-25 07:00:14 +0000 |
209 | @@ -43,8 +43,8 @@ |
210 | ChildScopesRepository(std::string const& repo_file_path, |
211 | boost::log::sources::severity_channel_logger_mt<>& logger); |
212 | |
213 | - ChildScopeList child_scopes_ordered(ChildScopeList const& child_scopes_unordered); |
214 | - bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered); |
215 | + ChildScopeList child_scopes(ChildScopeList const& child_scopes_unordered); |
216 | + bool set_child_scopes(ChildScopeList const& child_scopes); |
217 | |
218 | private: |
219 | bool write_repo(ChildScopeList const& child_scopes_list); |
220 | |
221 | === modified file 'include/unity/scopes/internal/MWScope.h' |
222 | --- include/unity/scopes/internal/MWScope.h 2015-01-26 08:20:45 +0000 |
223 | +++ include/unity/scopes/internal/MWScope.h 2015-03-25 07:00:14 +0000 |
224 | @@ -59,8 +59,8 @@ |
225 | VariantMap const& hints, |
226 | MWReplyProxy const& reply) = 0; |
227 | |
228 | - virtual ChildScopeList child_scopes_ordered() = 0; |
229 | - virtual bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) = 0; |
230 | + virtual ChildScopeList child_scopes() = 0; |
231 | + virtual bool set_child_scopes(ChildScopeList const& child_scopes) = 0; |
232 | |
233 | virtual bool debug_mode() = 0; |
234 | |
235 | |
236 | === modified file 'include/unity/scopes/internal/ScopeBaseImpl.h' |
237 | --- include/unity/scopes/internal/ScopeBaseImpl.h 2014-12-18 05:37:39 +0000 |
238 | +++ include/unity/scopes/internal/ScopeBaseImpl.h 2015-03-25 07:00:14 +0000 |
239 | @@ -64,9 +64,9 @@ |
240 | |
241 | void set_child_scopes_repo(std::shared_ptr<ChildScopesRepository> const& child_scopes_repo); |
242 | |
243 | - ChildScopeList child_scopes() const; |
244 | - ChildScopeList child_scopes_ordered(ChildScopeList const& unordered_child_scopes) const; |
245 | - bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered); |
246 | + ChildScopeList find_child_scopes() const; |
247 | + ChildScopeList child_scopes(ChildScopeList const& unordered_child_scopes) const; |
248 | + bool set_child_scopes(ChildScopeList const& child_scopes); |
249 | |
250 | private: |
251 | std::string scope_directory_; |
252 | |
253 | === modified file 'include/unity/scopes/internal/ScopeImpl.h' |
254 | --- include/unity/scopes/internal/ScopeImpl.h 2015-01-26 08:20:45 +0000 |
255 | +++ include/unity/scopes/internal/ScopeImpl.h 2015-03-25 07:00:14 +0000 |
256 | @@ -92,8 +92,8 @@ |
257 | ActionMetadata const& hints, |
258 | PreviewListenerBase::SPtr const& reply) override; |
259 | |
260 | - virtual ChildScopeList child_scopes_ordered() override; |
261 | - virtual bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) override; |
262 | + virtual ChildScopeList child_scopes() override; |
263 | + virtual bool set_child_scopes(ChildScopeList const& child_scopes) override; |
264 | |
265 | static ScopeProxy create(MWScopeProxy const& mw_proxy, std::string const& scope_id); |
266 | |
267 | |
268 | === modified file 'include/unity/scopes/internal/ScopeObject.h' |
269 | --- include/unity/scopes/internal/ScopeObject.h 2015-02-03 04:40:54 +0000 |
270 | +++ include/unity/scopes/internal/ScopeObject.h 2015-03-25 07:00:14 +0000 |
271 | @@ -77,8 +77,8 @@ |
272 | MWReplyProxy const& reply, |
273 | InvokeInfo const& info) override; |
274 | |
275 | - virtual ChildScopeList child_scopes_ordered() const override; |
276 | - virtual bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) override; |
277 | + virtual ChildScopeList child_scopes() const override; |
278 | + virtual bool set_child_scopes(ChildScopeList const& child_scopes) override; |
279 | |
280 | virtual bool debug_mode() const override; |
281 | |
282 | |
283 | === modified file 'include/unity/scopes/internal/ScopeObjectBase.h' |
284 | --- include/unity/scopes/internal/ScopeObjectBase.h 2015-01-27 09:38:24 +0000 |
285 | +++ include/unity/scopes/internal/ScopeObjectBase.h 2015-03-25 07:00:14 +0000 |
286 | @@ -69,8 +69,8 @@ |
287 | MWReplyProxy const& reply, |
288 | InvokeInfo const& info) = 0; |
289 | |
290 | - virtual ChildScopeList child_scopes_ordered() const = 0; |
291 | - virtual bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) = 0; |
292 | + virtual ChildScopeList child_scopes() const = 0; |
293 | + virtual bool set_child_scopes(ChildScopeList const& child_scopes) = 0; |
294 | |
295 | virtual bool debug_mode() const = 0; |
296 | }; |
297 | |
298 | === modified file 'include/unity/scopes/internal/smartscopes/SSScopeObject.h' |
299 | --- include/unity/scopes/internal/smartscopes/SSScopeObject.h 2015-01-26 08:20:45 +0000 |
300 | +++ include/unity/scopes/internal/smartscopes/SSScopeObject.h 2015-03-25 07:00:14 +0000 |
301 | @@ -74,8 +74,8 @@ |
302 | MWReplyProxy const& reply, |
303 | InvokeInfo const& info) override; |
304 | |
305 | - ChildScopeList child_scopes_ordered() const override; |
306 | - bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) override; |
307 | + ChildScopeList child_scopes() const override; |
308 | + bool set_child_scopes(ChildScopeList const& child_scopes) override; |
309 | |
310 | bool debug_mode() const override; |
311 | |
312 | |
313 | === modified file 'include/unity/scopes/internal/zmq_middleware/ScopeI.h' |
314 | --- include/unity/scopes/internal/zmq_middleware/ScopeI.h 2014-12-09 03:59:22 +0000 |
315 | +++ include/unity/scopes/internal/zmq_middleware/ScopeI.h 2015-03-25 07:00:14 +0000 |
316 | @@ -53,10 +53,10 @@ |
317 | virtual void preview_(Current const& current, |
318 | capnp::AnyPointer::Reader& in_params, |
319 | capnproto::Response::Builder& r); |
320 | - virtual void child_scopes_ordered_(Current const& current, |
321 | + virtual void child_scopes_(Current const& current, |
322 | capnp::AnyPointer::Reader& in_params, |
323 | capnproto::Response::Builder& r); |
324 | - virtual void set_child_scopes_ordered_(Current const& current, |
325 | + virtual void set_child_scopes_(Current const& current, |
326 | capnp::AnyPointer::Reader& in_params, |
327 | capnproto::Response::Builder& r); |
328 | virtual void debug_mode_(Current const& current, |
329 | |
330 | === modified file 'include/unity/scopes/internal/zmq_middleware/ZmqScope.h' |
331 | --- include/unity/scopes/internal/zmq_middleware/ZmqScope.h 2015-01-26 08:20:45 +0000 |
332 | +++ include/unity/scopes/internal/zmq_middleware/ZmqScope.h 2015-03-25 07:00:14 +0000 |
333 | @@ -63,8 +63,8 @@ |
334 | VariantMap const& hints, |
335 | MWReplyProxy const& reply) override; |
336 | |
337 | - virtual ChildScopeList child_scopes_ordered() override; |
338 | - virtual bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) override; |
339 | + virtual ChildScopeList child_scopes() override; |
340 | + virtual bool set_child_scopes(ChildScopeList const& child_scopes) override; |
341 | |
342 | virtual bool debug_mode() override; |
343 | |
344 | |
345 | === modified file 'include/unity/scopes/testing/MockScope.h' |
346 | --- include/unity/scopes/testing/MockScope.h 2014-12-17 08:08:25 +0000 |
347 | +++ include/unity/scopes/testing/MockScope.h 2015-03-25 07:00:14 +0000 |
348 | @@ -64,9 +64,9 @@ |
349 | ActionMetadata const&, |
350 | PreviewListenerBase::SPtr const&)); |
351 | |
352 | - MOCK_METHOD0(child_scopes_ordered, ChildScopeList()); |
353 | + MOCK_METHOD0(child_scopes, ChildScopeList()); |
354 | |
355 | - MOCK_METHOD1(set_child_scopes_ordered, bool(ChildScopeList const&)); |
356 | + MOCK_METHOD1(set_child_scopes, bool(ChildScopeList const&)); |
357 | }; |
358 | |
359 | /// @endcond |
360 | |
361 | === modified file 'src/scopes/ScopeBase.cpp' |
362 | --- src/scopes/ScopeBase.cpp 2014-12-09 07:15:24 +0000 |
363 | +++ src/scopes/ScopeBase.cpp 2015-03-25 07:00:14 +0000 |
364 | @@ -102,14 +102,14 @@ |
365 | return p->settings(); |
366 | } |
367 | |
368 | +ChildScopeList ScopeBase::find_child_scopes() const |
369 | +{ |
370 | + return p->find_child_scopes(); |
371 | +} |
372 | + |
373 | ChildScopeList ScopeBase::child_scopes() const |
374 | { |
375 | - return p->child_scopes(); |
376 | -} |
377 | - |
378 | -ChildScopeList ScopeBase::child_scopes_ordered() const |
379 | -{ |
380 | - return p->child_scopes_ordered(child_scopes()); |
381 | + return p->child_scopes(find_child_scopes()); |
382 | } |
383 | |
384 | } // namespace scopes |
385 | |
386 | === modified file 'src/scopes/internal/ChildScopesRepository.cpp' |
387 | --- src/scopes/internal/ChildScopesRepository.cpp 2014-12-18 06:03:42 +0000 |
388 | +++ src/scopes/internal/ChildScopesRepository.cpp 2015-03-25 07:00:14 +0000 |
389 | @@ -34,7 +34,7 @@ |
390 | { |
391 | } |
392 | |
393 | -ChildScopeList ChildScopesRepository::child_scopes_ordered(ChildScopeList const& child_scopes_unordered) |
394 | +ChildScopeList ChildScopesRepository::child_scopes(ChildScopeList const& child_scopes_unordered) |
395 | { |
396 | std::lock_guard<std::mutex> lock(mutex_); |
397 | |
398 | @@ -117,11 +117,11 @@ |
399 | return new_child_scopes_ordered; |
400 | } |
401 | |
402 | -bool ChildScopesRepository::set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) |
403 | +bool ChildScopesRepository::set_child_scopes(ChildScopeList const& child_scopes) |
404 | { |
405 | // simply write child_scopes_ordered to file |
406 | std::lock_guard<std::mutex> lock(mutex_); |
407 | - return write_repo(child_scopes_ordered); |
408 | + return write_repo(child_scopes); |
409 | } |
410 | |
411 | bool ChildScopesRepository::write_repo(ChildScopeList const& child_scopes_list) |
412 | |
413 | === modified file 'src/scopes/internal/ScopeBaseImpl.cpp' |
414 | --- src/scopes/internal/ScopeBaseImpl.cpp 2015-01-26 08:10:59 +0000 |
415 | +++ src/scopes/internal/ScopeBaseImpl.cpp 2015-03-25 07:00:14 +0000 |
416 | @@ -181,7 +181,7 @@ |
417 | child_scopes_repo_initialized_ = true; |
418 | } |
419 | |
420 | -ChildScopeList ScopeBaseImpl::child_scopes() const |
421 | +ChildScopeList ScopeBaseImpl::find_child_scopes() const |
422 | { |
423 | // Get a copy of the registry proxy |
424 | RegistryProxy reg = registry(); |
425 | @@ -201,24 +201,24 @@ |
426 | return return_list; |
427 | } |
428 | |
429 | -ChildScopeList ScopeBaseImpl::child_scopes_ordered(ChildScopeList const& child_scopes_unordered) const |
430 | +ChildScopeList ScopeBaseImpl::child_scopes(ChildScopeList const& child_scopes_unordered) const |
431 | { |
432 | lock_guard<mutex> lock(mutex_); |
433 | if (!child_scopes_repo_initialized_) |
434 | { |
435 | - throw LogicException("ScopeBase::child_scopes_ordered() cannot be called from constructor"); |
436 | + throw LogicException("ScopeBase::child_scopes() cannot be called from constructor"); |
437 | } |
438 | - return child_scopes_repo_ ? child_scopes_repo_->child_scopes_ordered(child_scopes_unordered) : ChildScopeList(); |
439 | + return child_scopes_repo_ ? child_scopes_repo_->child_scopes(child_scopes_unordered) : ChildScopeList(); |
440 | } |
441 | |
442 | -bool ScopeBaseImpl::set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) |
443 | +bool ScopeBaseImpl::set_child_scopes(ChildScopeList const& child_scopes) |
444 | { |
445 | lock_guard<mutex> lock(mutex_); |
446 | if (!child_scopes_repo_initialized_) |
447 | { |
448 | - throw LogicException("ScopeBase::set_child_scopes_ordered() cannot be called from constructor"); |
449 | + throw LogicException("ScopeBase::set_child_scopes() cannot be called from constructor"); |
450 | } |
451 | - return child_scopes_repo_ ? child_scopes_repo_->set_child_scopes_ordered(child_scopes_ordered) : false; |
452 | + return child_scopes_repo_ ? child_scopes_repo_->set_child_scopes(child_scopes) : false; |
453 | } |
454 | |
455 | } // namespace internal |
456 | |
457 | === modified file 'src/scopes/internal/ScopeImpl.cpp' |
458 | --- src/scopes/internal/ScopeImpl.cpp 2015-01-26 08:20:45 +0000 |
459 | +++ src/scopes/internal/ScopeImpl.cpp 2015-03-25 07:00:14 +0000 |
460 | @@ -319,14 +319,14 @@ |
461 | return ctrl; |
462 | } |
463 | |
464 | -ChildScopeList ScopeImpl::child_scopes_ordered() |
465 | +ChildScopeList ScopeImpl::child_scopes() |
466 | { |
467 | - return fwd()->child_scopes_ordered(); |
468 | + return fwd()->child_scopes(); |
469 | } |
470 | |
471 | -bool ScopeImpl::set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) |
472 | +bool ScopeImpl::set_child_scopes(ChildScopeList const& child_scopes) |
473 | { |
474 | - return fwd()->set_child_scopes_ordered(child_scopes_ordered); |
475 | + return fwd()->set_child_scopes(child_scopes); |
476 | } |
477 | |
478 | ScopeProxy ScopeImpl::create(MWScopeProxy const& mw_proxy, std::string const& scope_id) |
479 | |
480 | === modified file 'src/scopes/internal/ScopeObject.cpp' |
481 | --- src/scopes/internal/ScopeObject.cpp 2015-02-03 04:47:35 +0000 |
482 | +++ src/scopes/internal/ScopeObject.cpp 2015-03-25 07:00:14 +0000 |
483 | @@ -257,14 +257,14 @@ |
484 | ); |
485 | } |
486 | |
487 | -ChildScopeList ScopeObject::child_scopes_ordered() const |
488 | +ChildScopeList ScopeObject::child_scopes() const |
489 | { |
490 | - return scope_base_->child_scopes_ordered(); |
491 | + return scope_base_->child_scopes(); |
492 | } |
493 | |
494 | -bool ScopeObject::set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) |
495 | +bool ScopeObject::set_child_scopes(ChildScopeList const& child_scopes) |
496 | { |
497 | - return scope_base_->p->set_child_scopes_ordered(child_scopes_ordered); |
498 | + return scope_base_->p->set_child_scopes(child_scopes); |
499 | } |
500 | |
501 | bool ScopeObject::debug_mode() const |
502 | |
503 | === modified file 'src/scopes/internal/smartscopes/SSScopeObject.cpp' |
504 | --- src/scopes/internal/smartscopes/SSScopeObject.cpp 2015-01-26 08:20:45 +0000 |
505 | +++ src/scopes/internal/smartscopes/SSScopeObject.cpp 2015-03-25 07:00:14 +0000 |
506 | @@ -192,12 +192,12 @@ |
507 | return info.mw->create_query_ctrl_proxy(reply->identity() + ".c", info.mw->get_query_ctrl_endpoint()); |
508 | } |
509 | |
510 | -ChildScopeList SSScopeObject::child_scopes_ordered() const |
511 | +ChildScopeList SSScopeObject::child_scopes() const |
512 | { |
513 | return ChildScopeList(); |
514 | } |
515 | |
516 | -bool SSScopeObject::set_child_scopes_ordered(ChildScopeList const&) |
517 | +bool SSScopeObject::set_child_scopes(ChildScopeList const&) |
518 | { |
519 | return false; |
520 | } |
521 | |
522 | === modified file 'src/scopes/internal/zmq_middleware/ScopeI.cpp' |
523 | --- src/scopes/internal/zmq_middleware/ScopeI.cpp 2015-01-26 08:20:45 +0000 |
524 | +++ src/scopes/internal/zmq_middleware/ScopeI.cpp 2015-03-25 07:00:14 +0000 |
525 | @@ -60,8 +60,8 @@ |
526 | QueryCtrl* preview(ValueDict result, ValueDict hints, Reply* replyProxy); |
527 | QueryCtrl* perform_action(ValueDict result, ValueDict hints, string action_id, Reply* replyProxy); |
528 | QueryCtrl* activate(ValueDict result, ValueDict hints, Reply* replyProxy); |
529 | - ChildScopeList child_scopes_ordered(); |
530 | - bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered); |
531 | + ChildScopeList child_scopes(); |
532 | + bool set_child_scopes(ChildScopeList const& child_scopes); |
533 | bool debug_mode(); |
534 | }; |
535 | |
536 | @@ -75,8 +75,8 @@ |
537 | { "preview", bind(&ScopeI::preview_, this, ph::_1, ph::_2, ph::_3) }, |
538 | { "activate", bind(&ScopeI::activate_, this, ph::_1, ph::_2, ph::_3) }, |
539 | { "perform_action", bind(&ScopeI::perform_action_, this, ph::_1, ph::_2, ph::_3) }, |
540 | - { "child_scopes_ordered", bind(&ScopeI::child_scopes_ordered_, this, ph::_1, ph::_2, ph::_3) }, |
541 | - { "set_child_scopes_ordered", bind(&ScopeI::set_child_scopes_ordered_, this, ph::_1, ph::_2, ph::_3) }, |
542 | + { "child_scopes", bind(&ScopeI::child_scopes_, this, ph::_1, ph::_2, ph::_3) }, |
543 | + { "set_child_scopes", bind(&ScopeI::set_child_scopes_, this, ph::_1, ph::_2, ph::_3) }, |
544 | { "debug_mode", bind(&ScopeI::debug_mode_, this, ph::_1, ph::_2, ph::_3) } |
545 | }) |
546 | { |
547 | @@ -200,21 +200,21 @@ |
548 | p.setCategory(ctrl_proxy->target_category().c_str()); |
549 | } |
550 | |
551 | -void ScopeI::child_scopes_ordered_(Current const&, |
552 | +void ScopeI::child_scopes_(Current const&, |
553 | capnp::AnyPointer::Reader&, |
554 | capnproto::Response::Builder& r) |
555 | { |
556 | auto delegate = dynamic_pointer_cast<ScopeObjectBase>(del()); |
557 | assert(delegate); |
558 | |
559 | - auto child_scopes_ordered = delegate->child_scopes_ordered(); |
560 | + auto child_scopes = delegate->child_scopes(); |
561 | |
562 | r.setStatus(capnproto::ResponseStatus::SUCCESS); |
563 | - auto list_response = r.initPayload().getAs<capnproto::Scope::ChildScopesOrderedResponse>(); |
564 | - auto list = list_response.initReturnValue(child_scopes_ordered.size()); |
565 | + auto list_response = r.initPayload().getAs<capnproto::Scope::ChildScopesResponse>(); |
566 | + auto list = list_response.initReturnValue(child_scopes.size()); |
567 | |
568 | int i = 0; |
569 | - for (auto const& child_scope : child_scopes_ordered) |
570 | + for (auto const& child_scope : child_scopes) |
571 | { |
572 | list[i].setId(child_scope.id); |
573 | list[i].setEnabled(child_scope.enabled); |
574 | @@ -222,14 +222,14 @@ |
575 | } |
576 | } |
577 | |
578 | -void ScopeI::set_child_scopes_ordered_(Current const&, |
579 | +void ScopeI::set_child_scopes_(Current const&, |
580 | capnp::AnyPointer::Reader& in_params, |
581 | capnproto::Response::Builder& r) |
582 | { |
583 | auto delegate = std::dynamic_pointer_cast<ScopeObjectBase>(del()); |
584 | assert(delegate); |
585 | |
586 | - auto list = in_params.getAs<capnproto::Scope::SetChildScopesOrderedRequest>().getChildScopesOrdered(); |
587 | + auto list = in_params.getAs<capnproto::Scope::SetChildScopesRequest>().getChildScopes(); |
588 | |
589 | ChildScopeList child_scope_list; |
590 | for (size_t i = 0; i < list.size(); ++i) |
591 | @@ -239,9 +239,9 @@ |
592 | child_scope_list.push_back( ChildScope{id, enabled} ); |
593 | } |
594 | |
595 | - bool result = delegate->set_child_scopes_ordered(child_scope_list); |
596 | + bool result = delegate->set_child_scopes(child_scope_list); |
597 | r.setStatus(capnproto::ResponseStatus::SUCCESS); |
598 | - auto response = r.initPayload().getAs<capnproto::Scope::SetChildScopesOrderedResponse>(); |
599 | + auto response = r.initPayload().getAs<capnproto::Scope::SetChildScopesResponse>(); |
600 | response.setReturnValue(result); |
601 | } |
602 | |
603 | |
604 | === modified file 'src/scopes/internal/zmq_middleware/ZmqScope.cpp' |
605 | --- src/scopes/internal/zmq_middleware/ZmqScope.cpp 2015-01-26 08:20:45 +0000 |
606 | +++ src/scopes/internal/zmq_middleware/ZmqScope.cpp 2015-03-25 07:00:14 +0000 |
607 | @@ -56,8 +56,8 @@ |
608 | QueryCtrl* activate(string query, ValueDict hints, Reply* replyProxy); |
609 | QueryCtrl* perform_action(string query, ValueDict hints, string action_id, Reply* replyProxy); |
610 | QueryCtrl* preview(string query, ValueDict hints, Reply* replyProxy); |
611 | - ChildScopeList child_scopes_ordered(); |
612 | - bool set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered); |
613 | + ChildScopeList child_scopes(); |
614 | + bool set_child_scopes(ChildScopeList const& child_scopes); |
615 | bool debug_mode(); |
616 | }; |
617 | |
618 | @@ -207,10 +207,10 @@ |
619 | return make_shared<QueryCtrlImpl>(p, reply_proxy); |
620 | } |
621 | |
622 | -ChildScopeList ZmqScope::child_scopes_ordered() |
623 | +ChildScopeList ZmqScope::child_scopes() |
624 | { |
625 | capnp::MallocMessageBuilder request_builder; |
626 | - make_request_(request_builder, "child_scopes_ordered"); |
627 | + make_request_(request_builder, "child_scopes"); |
628 | |
629 | auto future = mw_base()->twoway_pool()->submit([&] { return this->invoke_scope_(request_builder); }); |
630 | |
631 | @@ -218,7 +218,7 @@ |
632 | auto response = out_params.reader->getRoot<capnproto::Response>(); |
633 | throw_if_runtime_exception(response); |
634 | |
635 | - auto list = response.getPayload().getAs<capnproto::Scope::ChildScopesOrderedResponse>().getReturnValue(); |
636 | + auto list = response.getPayload().getAs<capnproto::Scope::ChildScopesResponse>().getReturnValue(); |
637 | |
638 | ChildScopeList child_scope_list; |
639 | for (size_t i = 0; i < list.size(); ++i) |
640 | @@ -230,16 +230,16 @@ |
641 | return child_scope_list; |
642 | } |
643 | |
644 | -bool ZmqScope::set_child_scopes_ordered(ChildScopeList const& child_scopes_ordered) |
645 | +bool ZmqScope::set_child_scopes(ChildScopeList const& child_scopes) |
646 | { |
647 | capnp::MallocMessageBuilder request_builder; |
648 | - auto request = make_request_(request_builder, "set_child_scopes_ordered"); |
649 | + auto request = make_request_(request_builder, "set_child_scopes"); |
650 | |
651 | - auto in_params = request.initInParams().getAs<capnproto::Scope::SetChildScopesOrderedRequest>(); |
652 | - auto list = in_params.initChildScopesOrdered(child_scopes_ordered.size()); |
653 | + auto in_params = request.initInParams().getAs<capnproto::Scope::SetChildScopesRequest>(); |
654 | + auto list = in_params.initChildScopes(child_scopes.size()); |
655 | |
656 | int i = 0; |
657 | - for (auto const& child_scope : child_scopes_ordered) |
658 | + for (auto const& child_scope : child_scopes) |
659 | { |
660 | list[i].setId(child_scope.id); |
661 | list[i].setEnabled(child_scope.enabled); |
662 | @@ -251,7 +251,7 @@ |
663 | auto r = out_params.reader->getRoot<capnproto::Response>(); |
664 | throw_if_runtime_exception(r); |
665 | |
666 | - auto response = r.getPayload().getAs<capnproto::Scope::SetChildScopesOrderedResponse>(); |
667 | + auto response = r.getPayload().getAs<capnproto::Scope::SetChildScopesResponse>(); |
668 | return response.getReturnValue(); |
669 | } |
670 | |
671 | |
672 | === modified file 'src/scopes/internal/zmq_middleware/capnproto/Scope.capnp' |
673 | --- src/scopes/internal/zmq_middleware/capnproto/Scope.capnp 2015-01-26 08:20:45 +0000 |
674 | +++ src/scopes/internal/zmq_middleware/capnproto/Scope.capnp 2015-03-25 07:00:14 +0000 |
675 | @@ -72,17 +72,17 @@ |
676 | enabled @1 : Bool; |
677 | } |
678 | |
679 | -struct ChildScopesOrderedResponse |
680 | +struct ChildScopesResponse |
681 | { |
682 | returnValue @0 : List(ChildScope); |
683 | } |
684 | |
685 | -struct SetChildScopesOrderedRequest |
686 | +struct SetChildScopesRequest |
687 | { |
688 | - childScopesOrdered @0 : List(ChildScope); |
689 | + childScopes @0 : List(ChildScope); |
690 | } |
691 | |
692 | -struct SetChildScopesOrderedResponse |
693 | +struct SetChildScopesResponse |
694 | { |
695 | returnValue @0 : Bool; |
696 | } |
697 | |
698 | === modified file 'test/gtest/scopes/ChildScopes/ChildScopes_test.cpp' |
699 | --- test/gtest/scopes/ChildScopes/ChildScopes_test.cpp 2015-02-17 00:27:08 +0000 |
700 | +++ test/gtest/scopes/ChildScopes/ChildScopes_test.cpp 2015-03-25 07:00:14 +0000 |
701 | @@ -142,9 +142,9 @@ |
702 | // Start TestScope |
703 | start_test_scope(); |
704 | |
705 | - // 1st TestScope::child_scopes() returns: "A,B,C" |
706 | + // 1st TestScope::find_child_scopes() returns: "A,B,C" |
707 | // No order has been set yet, so we should just get: "A,B,C" |
708 | - ChildScopeList return_list = test_scope->child_scopes_ordered(); |
709 | + ChildScopeList return_list = test_scope->child_scopes(); |
710 | EXPECT_EQ(3, return_list.size()); |
711 | EXPECT_EQ("ScopeA", return_list.front().id); |
712 | EXPECT_FALSE(return_list.front().enabled); |
713 | @@ -160,11 +160,11 @@ |
714 | list.push_back({"ScopeB", false}); |
715 | list.push_back({"ScopeE", false}); |
716 | list.push_back({"ScopeA", true}); |
717 | - EXPECT_TRUE(test_scope->set_child_scopes_ordered(list)); |
718 | + EXPECT_TRUE(test_scope->set_child_scopes(list)); |
719 | |
720 | - // 2nd TestScope::child_scopes() returns: "D,A,B,C,E" |
721 | + // 2nd TestScope::find_child_scopes() returns: "D,A,B,C,E" |
722 | // with order: "B,E,A", we should get: "B,E,A,D,C" |
723 | - return_list = test_scope->child_scopes_ordered(); |
724 | + return_list = test_scope->child_scopes(); |
725 | EXPECT_EQ(5, return_list.size()); |
726 | EXPECT_EQ("ScopeB", return_list.front().id); |
727 | EXPECT_FALSE(return_list.front().enabled); |
728 | @@ -181,9 +181,9 @@ |
729 | EXPECT_EQ("ScopeC", return_list.front().id); |
730 | EXPECT_TRUE(return_list.front().enabled); |
731 | |
732 | - // 3rd+ TestScope::child_scopes() returns: "D,A,B" |
733 | + // 3rd+ TestScope::find_child_scopes() returns: "D,A,B" |
734 | // with order: "B,E,A,D,C", we should get: "B,A,D" |
735 | - return_list = test_scope->child_scopes_ordered(); |
736 | + return_list = test_scope->child_scopes(); |
737 | EXPECT_EQ(3, return_list.size()); |
738 | EXPECT_EQ("ScopeB", return_list.front().id); |
739 | EXPECT_FALSE(return_list.front().enabled); |
740 | @@ -200,12 +200,12 @@ |
741 | list.push_back({"ScopeD", true}); |
742 | list.push_back({"ScopeX", true}); |
743 | list.push_back({"ScopeA", false}); |
744 | - EXPECT_TRUE(test_scope->set_child_scopes_ordered(list)); |
745 | + EXPECT_TRUE(test_scope->set_child_scopes(list)); |
746 | |
747 | - // 3rd+ TestScope::child_scopes() returns: "D,A,B" |
748 | + // 3rd+ TestScope::find_child_scopes() returns: "D,A,B" |
749 | // with order: "B,D,X,A", we should get: "B,D,A" |
750 | - return_list = test_scope->child_scopes_ordered(); |
751 | - return_list = test_scope->child_scopes_ordered(); |
752 | + return_list = test_scope->child_scopes(); |
753 | + return_list = test_scope->child_scopes(); |
754 | EXPECT_EQ(3, return_list.size()); |
755 | EXPECT_EQ("ScopeB", return_list.front().id); |
756 | EXPECT_FALSE(return_list.front().enabled); |
757 | @@ -223,9 +223,9 @@ |
758 | // Start TestScope |
759 | start_test_scope(); |
760 | |
761 | - // 1st TestScope::child_scopes() returns: "A,B,C" |
762 | + // 1st TestScope::find_child_scopes() returns: "A,B,C" |
763 | // with order: "B,D,A" (from previous test), we should get: "B,A,C" |
764 | - ChildScopeList return_list = test_scope->child_scopes_ordered(); |
765 | + ChildScopeList return_list = test_scope->child_scopes(); |
766 | EXPECT_EQ(3, return_list.size()); |
767 | EXPECT_EQ("ScopeB", return_list.front().id); |
768 | EXPECT_FALSE(return_list.front().enabled); |
769 | @@ -250,11 +250,11 @@ |
770 | list.push_back({"ScopeB", false}); |
771 | list.push_back({"ScopeA", false}); |
772 | list.push_back({"ScopeC", true}); |
773 | - EXPECT_FALSE(test_scope->set_child_scopes_ordered(list)); |
774 | + EXPECT_FALSE(test_scope->set_child_scopes(list)); |
775 | |
776 | - // 1st TestScope::child_scopes() returns: "A,B,C" |
777 | + // 1st TestScope::find_child_scopes() returns: "A,B,C" |
778 | // No order was set, so we should just get: "A,B,C" |
779 | - ChildScopeList return_list = test_scope->child_scopes_ordered(); |
780 | + ChildScopeList return_list = test_scope->child_scopes(); |
781 | EXPECT_EQ(3, return_list.size()); |
782 | EXPECT_EQ("ScopeA", return_list.front().id); |
783 | EXPECT_FALSE(return_list.front().enabled); |
784 | @@ -276,9 +276,9 @@ |
785 | write_partially_corrupt_config(); |
786 | start_test_scope(); |
787 | |
788 | - // 1st TestScope::child_scopes() returns: "A,B,C" |
789 | + // 1st TestScope::find_child_scopes() returns: "A,B,C" |
790 | // with partial order: "B", we should get: "B,A,C" |
791 | - ChildScopeList return_list = test_scope->child_scopes_ordered(); |
792 | + ChildScopeList return_list = test_scope->child_scopes(); |
793 | EXPECT_EQ(3, return_list.size()); |
794 | EXPECT_EQ("ScopeB", return_list.front().id); |
795 | EXPECT_TRUE(return_list.front().enabled); |
796 | @@ -295,7 +295,7 @@ |
797 | start_test_scope(); |
798 | |
799 | // Check that nothing crashes and we simply get the list from the scope as is |
800 | - return_list = test_scope->child_scopes_ordered(); |
801 | + return_list = test_scope->child_scopes(); |
802 | EXPECT_EQ(3, return_list.size()); |
803 | EXPECT_EQ("ScopeA", return_list.front().id); |
804 | EXPECT_FALSE(return_list.front().enabled); |
805 | @@ -312,7 +312,7 @@ |
806 | start_test_scope(); |
807 | |
808 | // Check that nothing crashes and we simply get the list from the scope as is |
809 | - return_list = test_scope->child_scopes_ordered(); |
810 | + return_list = test_scope->child_scopes(); |
811 | EXPECT_EQ(3, return_list.size()); |
812 | EXPECT_EQ("ScopeA", return_list.front().id); |
813 | EXPECT_FALSE(return_list.front().enabled); |
814 | |
815 | === modified file 'test/gtest/scopes/ChildScopes/TestScope.h' |
816 | --- test/gtest/scopes/ChildScopes/TestScope.h 2014-12-17 08:08:25 +0000 |
817 | +++ test/gtest/scopes/ChildScopes/TestScope.h 2015-03-25 07:00:14 +0000 |
818 | @@ -39,9 +39,9 @@ |
819 | return nullptr; |
820 | } |
821 | |
822 | - ChildScopeList child_scopes() const override |
823 | + ChildScopeList find_child_scopes() const override |
824 | { |
825 | - // 1st TestScope::child_scopes() returns: "A,B,C" |
826 | + // 1st TestScope::find_child_scopes() returns: "A,B,C" |
827 | if (i == 0) |
828 | { |
829 | ChildScopeList list; |
830 | @@ -51,7 +51,7 @@ |
831 | ++i; |
832 | return list; |
833 | } |
834 | - // 2nd TestScope::child_scopes() returns: "D,A,B,C,E" |
835 | + // 2nd TestScope::find_child_scopes() returns: "D,A,B,C,E" |
836 | else if (i == 1) |
837 | { |
838 | ChildScopeList list; |
839 | @@ -63,7 +63,7 @@ |
840 | ++i; |
841 | return list; |
842 | } |
843 | - // 3rd+ TestScope::child_scopes() returns: D,A,B |
844 | + // 3rd+ TestScope::find_child_scopes() returns: D,A,B |
845 | else |
846 | { |
847 | ChildScopeList list; |
848 | |
849 | === modified file 'test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp' |
850 | --- test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp 2014-12-17 08:08:25 +0000 |
851 | +++ test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp 2015-03-25 07:00:14 +0000 |
852 | @@ -92,9 +92,9 @@ |
853 | ActionMetadata const&, |
854 | PreviewListenerBase::SPtr const&)); |
855 | |
856 | - MOCK_METHOD0(child_scopes_ordered, ChildScopeList()); |
857 | + MOCK_METHOD0(child_scopes, ChildScopeList()); |
858 | |
859 | - MOCK_METHOD1(set_child_scopes_ordered, bool(ChildScopeList const&)); |
860 | + MOCK_METHOD1(set_child_scopes, bool(ChildScopeList const&)); |
861 | }; |
862 | |
863 | |
864 | |
865 | === modified file 'test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp' |
866 | --- test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp 2015-02-09 02:23:22 +0000 |
867 | +++ test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp 2015-03-25 07:00:14 +0000 |
868 | @@ -454,12 +454,12 @@ |
869 | return nullptr; |
870 | } |
871 | |
872 | - virtual ChildScopeList child_scopes_ordered() const override |
873 | + virtual ChildScopeList child_scopes() const override |
874 | { |
875 | return ChildScopeList(); |
876 | } |
877 | |
878 | - virtual bool set_child_scopes_ordered(ChildScopeList const&) override |
879 | + virtual bool set_child_scopes(ChildScopeList const&) override |
880 | { |
881 | return false; |
882 | } |
PASSED: Continuous integration, rev:324 jenkins. qa.ubuntu. com/job/ unity-scopes- api-ci/ 604/ jenkins. qa.ubuntu. com/job/ unity-scopes- api-vivid- amd64-ci/ 138 jenkins. qa.ubuntu. com/job/ unity-scopes- api-vivid- armhf-ci/ 129 jenkins. qa.ubuntu. com/job/ unity-scopes- api-vivid- armhf-ci/ 129/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity-scopes- api-vivid- i386-ci/ 130
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- scopes- api-ci/ 604/rebuild
http://