Merge lp:~dobey/unity-scope-click/fix-the-flow into lp:unity-scope-click

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 352
Merged at revision: 335
Proposed branch: lp:~dobey/unity-scope-click/fix-the-flow
Merge into: lp:unity-scope-click
Diff against target: 703 lines (+137/-103)
11 files modified
libclickscope/click/pay.cpp (+18/-6)
libclickscope/click/pay.h (+1/-1)
libclickscope/click/preview.cpp (+56/-31)
libclickscope/click/preview.h (+17/-6)
libclickscope/tests/mock_pay.h (+8/-0)
libclickscope/tests/test_pay.cpp (+0/-2)
libclickscope/tests/test_preview.cpp (+27/-53)
scope/clickapps/apps-scope.cpp (+3/-1)
scope/clickapps/apps-scope.h (+3/-1)
scope/clickstore/store-scope.cpp (+3/-1)
scope/clickstore/store-scope.h (+1/-1)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/fix-the-flow
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Charles Kerr (community) Approve
Review via email: mp+263387@code.launchpad.net

Commit message

Ensure 'Cancel Purchase' button is shown immediately after a purchase.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:345
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~dobey/unity-scope-click/fix-the-flow/+merge/263387/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-scope-click-ci/642/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-amd64-ci/56
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-armhf-ci/52
        deb: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-armhf-ci/52/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-scope-click-ci/642/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:346
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~dobey/unity-scope-click/fix-the-flow/+merge/263387/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-scope-click-ci/643/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-amd64-ci/57/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-armhf-ci/53/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-scope-click-ci/643/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:347
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~dobey/unity-scope-click/fix-the-flow/+merge/263387/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-scope-click-ci/644/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-amd64-ci/58/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-armhf-ci/54/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-scope-click-ci/644/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:348
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~dobey/unity-scope-click/fix-the-flow/+merge/263387/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-scope-click-ci/645/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-amd64-ci/59
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-armhf-ci/55
        deb: http://jenkins.qa.ubuntu.com/job/unity-scope-click-wily-armhf-ci/55/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-scope-click-ci/645/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

r351 is an abomination, we must revisit this after the deadline and fix the libpay internals so that this isn't needed. :-)

Still, I agree with this as a short-term workaround to ensure that is_refundable() hits a fresh cache so that it uses the right state to determine if things are refundable or not.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libclickscope/click/pay.cpp'
--- libclickscope/click/pay.cpp 2015-06-17 16:32:08 +0000
+++ libclickscope/click/pay.cpp 2015-07-02 22:21:56 +0000
@@ -36,6 +36,7 @@
3636
37#include <glib.h>37#include <glib.h>
38#include <libpay/pay-package.h>38#include <libpay/pay-package.h>
39#include <unistd.h>
3940
40#include <QDebug>41#include <QDebug>
4142
@@ -110,11 +111,6 @@
110 return lhs.name == rhs.name;111 return lhs.name == rhs.name;
111}112}
112113
113Package& Package::instance() {
114 static Package the_instance;
115 return the_instance;
116}
117
118Package::Package() : impl(new Private())114Package::Package() : impl(new Private())
119{115{
120}116}
@@ -201,6 +197,23 @@
201 return false;197 return false;
202}198}
203199
200bool Package::is_refundable(const std::string& pkg_name)
201{
202 if (!running) {
203 setup_pay_service();
204 }
205
206 if (verify(pkg_name)) {
207 // No Hondas, why racing? Wait for it…
208 usleep(10000);
209
210 return pay_package_item_is_refundable(impl->pay_package,
211 pkg_name.c_str()) == 0 ? false : true;
212 }
213 // If verify() returned false, then it's not purchased.
214 return false;
215}
216
204time_t parse_timestamp(json::Value v)217time_t parse_timestamp(json::Value v)
205{218{
206 if (v.isNull()) {219 if (v.isNull()) {
@@ -213,7 +226,6 @@
213 return when.toTime_t();226 return when.toTime_t();
214}227}
215228
216
217click::web::Cancellable Package::get_purchases(std::function<void(const PurchaseSet&)> callback)229click::web::Cancellable Package::get_purchases(std::function<void(const PurchaseSet&)> callback)
218{230{
219 QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());231 QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
220232
=== modified file 'libclickscope/click/pay.h'
--- libclickscope/click/pay.h 2015-06-17 16:27:26 +0000
+++ libclickscope/click/pay.h 2015-07-02 22:21:56 +0000
@@ -102,9 +102,9 @@
102102
103 virtual bool refund(const std::string& pkg_name);103 virtual bool refund(const std::string& pkg_name);
104 virtual bool verify(const std::string& pkg_name);104 virtual bool verify(const std::string& pkg_name);
105 virtual bool is_refundable(const std::string& pkg_name);
105 virtual click::web::Cancellable get_purchases(std::function<void(const PurchaseSet& purchased_apps)> callback);106 virtual click::web::Cancellable get_purchases(std::function<void(const PurchaseSet& purchased_apps)> callback);
106 static std::string get_base_url();107 static std::string get_base_url();
107 static Package& instance();
108108
109 protected:109 protected:
110 virtual void setup_pay_service();110 virtual void setup_pay_service();
111111
=== modified file 'libclickscope/click/preview.cpp'
--- libclickscope/click/preview.cpp 2015-06-17 16:59:14 +0000
+++ libclickscope/click/preview.cpp 2015-07-02 22:21:56 +0000
@@ -103,9 +103,10 @@
103103
104void Preview::choose_strategy(const QSharedPointer<web::Client> &client,104void Preview::choose_strategy(const QSharedPointer<web::Client> &client,
105 const QSharedPointer<click::network::AccessManager>& nam,105 const QSharedPointer<click::network::AccessManager>& nam,
106 const QSharedPointer<pay::Package>& ppackage,
106 std::shared_ptr<click::DepartmentsDb> depts)107 std::shared_ptr<click::DepartmentsDb> depts)
107{108{
108 strategy.reset(build_strategy(result, metadata, client, nam, depts));109 strategy.reset(build_strategy(result, metadata, client, nam, ppackage, depts));
109}110}
110111
111PreviewStrategy* Preview::build_installing(const std::string& download_url,112PreviewStrategy* Preview::build_installing(const std::string& download_url,
@@ -120,9 +121,10 @@
120121
121122
122PreviewStrategy* Preview::build_strategy(const unity::scopes::Result &result,123PreviewStrategy* Preview::build_strategy(const unity::scopes::Result &result,
123 const unity::scopes::ActionMetadata &metadata,124 const unity::scopes::ActionMetadata &metadata,
124 const QSharedPointer<web::Client> &client,125 const QSharedPointer<web::Client> &client,
125 const QSharedPointer<click::network::AccessManager>& nam,126 const QSharedPointer<click::network::AccessManager>& nam,
127 const QSharedPointer<pay::Package>& ppackage,
126 std::shared_ptr<click::DepartmentsDb> depts)128 std::shared_ptr<click::DepartmentsDb> depts)
127{129{
128 if (metadata.scope_data().which() != scopes::Variant::Type::Null) {130 if (metadata.scope_data().which() != scopes::Variant::Type::Null) {
@@ -137,7 +139,7 @@
137 << " and close_preview="139 << " and close_preview="
138 << metadict.count(click::Preview::Actions::SHOW_INSTALLED);140 << metadict.count(click::Preview::Actions::SHOW_INSTALLED);
139141
140 return new InstalledPreview(result, metadata, client, depts);142 return new InstalledPreview(result, metadata, client, ppackage, depts);
141 } else if (metadict.count("action_id") != 0 && metadict.count("download_url") != 0) {143 } else if (metadict.count("action_id") != 0 && metadict.count("download_url") != 0) {
142 std::string action_id = metadict["action_id"].get_string();144 std::string action_id = metadict["action_id"].get_string();
143 std::string download_url = metadict["download_url"].get_string();145 std::string download_url = metadict["download_url"].get_string();
@@ -147,7 +149,7 @@
147 } else {149 } else {
148 qWarning() << "unexpected action id " << QString::fromStdString(action_id)150 qWarning() << "unexpected action id " << QString::fromStdString(action_id)
149 << " given with download_url" << QString::fromStdString(download_url);151 << " given with download_url" << QString::fromStdString(download_url);
150 return new UninstalledPreview(result, client, depts, nam);152 return new UninstalledPreview(result, client, depts, nam, ppackage);
151 }153 }
152 } else if (metadict.count(click::Preview::Actions::CANCEL_PURCHASE_UNINSTALLED) != 0) {154 } else if (metadict.count(click::Preview::Actions::CANCEL_PURCHASE_UNINSTALLED) != 0) {
153 return new CancelPurchasePreview(result, false);155 return new CancelPurchasePreview(result, false);
@@ -156,16 +158,16 @@
156 } else if (metadict.count(click::Preview::Actions::UNINSTALL_CLICK) != 0) {158 } else if (metadict.count(click::Preview::Actions::UNINSTALL_CLICK) != 0) {
157 return new UninstallConfirmationPreview(result);159 return new UninstallConfirmationPreview(result);
158 } else if (metadict.count(click::Preview::Actions::CONFIRM_UNINSTALL) != 0) {160 } else if (metadict.count(click::Preview::Actions::CONFIRM_UNINSTALL) != 0) {
159 return new UninstallingPreview(result, client, nam);161 return new UninstallingPreview(result, client, nam, ppackage);
160 } else if (metadict.count(click::Preview::Actions::CONFIRM_CANCEL_PURCHASE) != 0) {162 } else if (metadict.count(click::Preview::Actions::CONFIRM_CANCEL_PURCHASE) != 0) {
161 return new CancellingPurchasePreview(result, client, nam);163 return new CancellingPurchasePreview(result, client, nam, ppackage);
162 } else if (metadict.count(click::Preview::Actions::RATED) != 0) {164 } else if (metadict.count(click::Preview::Actions::RATED) != 0) {
163 return new InstalledPreview(result, metadata, client, depts);165 return new InstalledPreview(result, metadata, client, ppackage, depts);
164 } else if (metadict.count(click::Preview::Actions::SHOW_UNINSTALLED) != 0) {166 } else if (metadict.count(click::Preview::Actions::SHOW_UNINSTALLED) != 0) {
165 return new UninstalledPreview(result, client, depts, nam);167 return new UninstalledPreview(result, client, depts, nam, ppackage);
166 } else {168 } else {
167 qWarning() << "preview() called with unexpected metadata. returning uninstalled preview";169 qWarning() << "preview() called with unexpected metadata. returning uninstalled preview";
168 return new UninstalledPreview(result, client, depts, nam);170 return new UninstalledPreview(result, client, depts, nam, ppackage);
169 }171 }
170 } else {172 } else {
171 // metadata.scope_data() is Null, so we return an appropriate "default" preview:173 // metadata.scope_data() is Null, so we return an appropriate "default" preview:
@@ -174,9 +176,9 @@
174 return new InstalledScopePreview(result);176 return new InstalledScopePreview(result);
175 }177 }
176 if (result["installed"].get_bool() == true) {178 if (result["installed"].get_bool() == true) {
177 return new InstalledPreview(result, metadata, client, depts);179 return new InstalledPreview(result, metadata, client, ppackage, depts);
178 } else {180 } else {
179 return new UninstalledPreview(result, client, depts, nam);181 return new UninstalledPreview(result, client, depts, nam, ppackage);
180 }182 }
181 }183 }
182184
@@ -210,6 +212,19 @@
210{212{
211}213}
212214
215PreviewStrategy::PreviewStrategy(const unity::scopes::Result& result,
216 const QSharedPointer<click::web::Client>& client,
217 const QSharedPointer<pay::Package>& ppackage)
218 : result(result),
219 client(client),
220 index(new click::Index(client)),
221 reviews(new click::Reviews(client)),
222 oa_client("ubuntuone", "ubuntuone", "ubuntuone",
223 scopes::OnlineAccountClient::MainLoopSelect::CreateInternalMainLoop),
224 pay_package(ppackage)
225{
226}
227
213void PreviewStrategy::pushPackagePreviewWidgets(const unity::scopes::PreviewReplyProxy &reply,228void PreviewStrategy::pushPackagePreviewWidgets(const unity::scopes::PreviewReplyProxy &reply,
214 const PackageDetails &details,229 const PackageDetails &details,
215 const scopes::PreviewWidgetList& button_area_widgets)230 const scopes::PreviewWidgetList& button_area_widgets)
@@ -229,6 +244,7 @@
229 index_operation.cancel();244 index_operation.cancel();
230 reviews_operation.cancel();245 reviews_operation.cancel();
231 submit_operation.cancel();246 submit_operation.cancel();
247 purchase_operation.cancel();
232}248}
233249
234scopes::PreviewWidget PreviewStrategy::build_other_metadata(const PackageDetails &details)250scopes::PreviewWidget PreviewStrategy::build_other_metadata(const PackageDetails &details)
@@ -529,15 +545,20 @@
529 return widgets;545 return widgets;
530}546}
531547
532bool PreviewStrategy::isRefundable() const548bool PreviewStrategy::isRefundable()
533{549{
534 time_t refundable_until = 0;550 if (pay_package.isNull())
535 if (result.contains("refundable_until")) {551 {
536 refundable_until = result["refundable_until"].get_int64_t();552 return false;
537 }553 }
538 time_t now = time(NULL);554
539 // refund button is not shown if less than ten seconds left555 std::string pkg_name = get_string_maybe_null(result["name"]);
540 return refundable_until >= (now + 10);556 if (pkg_name.empty())
557 {
558 return false;
559 }
560
561 return pay_package->is_refundable(pkg_name);
541}562}
542563
543void PreviewStrategy::invalidateScope(const std::string& scope_id)564void PreviewStrategy::invalidateScope(const std::string& scope_id)
@@ -657,8 +678,9 @@
657InstalledPreview::InstalledPreview(const unity::scopes::Result& result,678InstalledPreview::InstalledPreview(const unity::scopes::Result& result,
658 const unity::scopes::ActionMetadata& metadata,679 const unity::scopes::ActionMetadata& metadata,
659 const QSharedPointer<click::web::Client>& client,680 const QSharedPointer<click::web::Client>& client,
681 const QSharedPointer<pay::Package>& ppackage,
660 const std::shared_ptr<click::DepartmentsDb>& depts)682 const std::shared_ptr<click::DepartmentsDb>& depts)
661 : PreviewStrategy(result, client),683 : PreviewStrategy(result, client, ppackage),
662 DepartmentUpdater(depts),684 DepartmentUpdater(depts),
663 metadata(metadata)685 metadata(metadata)
664{686{
@@ -1065,8 +1087,9 @@
1065UninstalledPreview::UninstalledPreview(const unity::scopes::Result& result,1087UninstalledPreview::UninstalledPreview(const unity::scopes::Result& result,
1066 const QSharedPointer<click::web::Client>& client,1088 const QSharedPointer<click::web::Client>& client,
1067 const std::shared_ptr<click::DepartmentsDb>& depts,1089 const std::shared_ptr<click::DepartmentsDb>& depts,
1068 const QSharedPointer<click::network::AccessManager>& nam)1090 const QSharedPointer<click::network::AccessManager>& nam,
1069 : PreviewStrategy(result, client),1091 const QSharedPointer<pay::Package>& ppackage)
1092 : PreviewStrategy(result, client, ppackage),
1070 DepartmentUpdater(depts), nam(nam)1093 DepartmentUpdater(depts), nam(nam)
1071{1094{
1072 qDebug() << "Creating new UninstalledPreview for result" << QString::fromStdString(result["name"].get_string());1095 qDebug() << "Creating new UninstalledPreview for result" << QString::fromStdString(result["name"].get_string());
@@ -1160,8 +1183,9 @@
1160// TODO: this class should be removed once uninstall() is handled elsewhere.1183// TODO: this class should be removed once uninstall() is handled elsewhere.
1161UninstallingPreview::UninstallingPreview(const unity::scopes::Result& result,1184UninstallingPreview::UninstallingPreview(const unity::scopes::Result& result,
1162 const QSharedPointer<click::web::Client>& client,1185 const QSharedPointer<click::web::Client>& client,
1163 const QSharedPointer<click::network::AccessManager>& nam)1186 const QSharedPointer<click::network::AccessManager>& nam,
1164 : UninstalledPreview(result, client, nullptr, nam)1187 const QSharedPointer<pay::Package>& ppackage)
1188 : UninstalledPreview(result, client, nullptr, nam, ppackage)
1165{1189{
1166}1190}
11671191
@@ -1201,9 +1225,10 @@
1201// class CancellingPurchasePreview : public UninstallingPreview1225// class CancellingPurchasePreview : public UninstallingPreview
12021226
1203CancellingPurchasePreview::CancellingPurchasePreview(const unity::scopes::Result& result,1227CancellingPurchasePreview::CancellingPurchasePreview(const unity::scopes::Result& result,
1204 const QSharedPointer<click::web::Client>& client,1228 const QSharedPointer<click::web::Client>& client,
1205 const QSharedPointer<click::network::AccessManager>& nam)1229 const QSharedPointer<click::network::AccessManager>& nam,
1206 : UninstallingPreview(result, client, nam)1230 const QSharedPointer<pay::Package>& ppackage)
1231 : UninstallingPreview(result, client, nam, ppackage)
1207{1232{
1208}1233}
12091234
@@ -1231,9 +1256,9 @@
1231 std::promise<bool> refund_promise;1256 std::promise<bool> refund_promise;
1232 std::future<bool> refund_future = refund_promise.get_future();1257 std::future<bool> refund_future = refund_promise.get_future();
12331258
1234 run_under_qt([&refund_promise, package_name]() {1259 run_under_qt([this, &refund_promise, package_name]() {
1235 qDebug() << "Calling refund for:" << package_name.c_str();1260 qDebug() << "Calling refund for:" << package_name.c_str();
1236 auto ret = pay::Package::instance().refund(package_name);1261 auto ret = pay_package->refund(package_name);
1237 qDebug() << "Refund returned:" << ret;1262 qDebug() << "Refund returned:" << ret;
1238 refund_promise.set_value(ret);1263 refund_promise.set_value(ret);
1239 });1264 });
12401265
=== modified file 'libclickscope/click/preview.h'
--- libclickscope/click/preview.h 2015-06-17 16:59:14 +0000
+++ libclickscope/click/preview.h 2015-07-02 22:21:56 +0000
@@ -32,6 +32,7 @@
3232
33#include <click/index.h>33#include <click/index.h>
34#include <click/download-manager.h>34#include <click/download-manager.h>
35#include <click/pay.h>
35#include <click/qtbridge.h>36#include <click/qtbridge.h>
36#include "reviews.h"37#include "reviews.h"
3738
@@ -75,6 +76,7 @@
75 const unity::scopes::ActionMetadata& metadata,76 const unity::scopes::ActionMetadata& metadata,
76 const QSharedPointer<web::Client> &client,77 const QSharedPointer<web::Client> &client,
77 const QSharedPointer<click::network::AccessManager>& nam,78 const QSharedPointer<click::network::AccessManager>& nam,
79 const QSharedPointer<pay::Package>& ppackage,
78 std::shared_ptr<click::DepartmentsDb> depts);80 std::shared_ptr<click::DepartmentsDb> depts);
79 virtual PreviewStrategy* build_installing(const std::string& download_url,81 virtual PreviewStrategy* build_installing(const std::string& download_url,
80 const std::string& download_sha512,82 const std::string& download_sha512,
@@ -113,6 +115,7 @@
113 virtual ~Preview();115 virtual ~Preview();
114 void choose_strategy(const QSharedPointer<web::Client> &client,116 void choose_strategy(const QSharedPointer<web::Client> &client,
115 const QSharedPointer<click::network::AccessManager>& nam,117 const QSharedPointer<click::network::AccessManager>& nam,
118 const QSharedPointer<pay::Package>& ppackage,
116 std::shared_ptr<click::DepartmentsDb> depts);119 std::shared_ptr<click::DepartmentsDb> depts);
117 // From unity::scopes::PreviewQuery120 // From unity::scopes::PreviewQuery
118 void cancelled() override;121 void cancelled() override;
@@ -125,8 +128,10 @@
125128
126 PreviewStrategy(const unity::scopes::Result& result);129 PreviewStrategy(const unity::scopes::Result& result);
127 PreviewStrategy(const unity::scopes::Result& result,130 PreviewStrategy(const unity::scopes::Result& result,
128 const QSharedPointer<click::web::Client>& client);131 const QSharedPointer<click::web::Client>& client);
129132 PreviewStrategy(const unity::scopes::Result& result,
133 const QSharedPointer<click::web::Client>& client,
134 const QSharedPointer<pay::Package>& pay_package);
130 virtual ~PreviewStrategy();135 virtual ~PreviewStrategy();
131136
132 virtual void cancelled();137 virtual void cancelled();
@@ -154,7 +159,7 @@
154 virtual scopes::PreviewWidget build_updates_table(const PackageDetails& details);159 virtual scopes::PreviewWidget build_updates_table(const PackageDetails& details);
155 virtual std::string build_whats_new(const PackageDetails& details);160 virtual std::string build_whats_new(const PackageDetails& details);
156 virtual void run_under_qt(const std::function<void ()> &task);161 virtual void run_under_qt(const std::function<void ()> &task);
157 virtual bool isRefundable() const;162 virtual bool isRefundable();
158 virtual void invalidateScope(const std::string& scope_id);163 virtual void invalidateScope(const std::string& scope_id);
159164
160 scopes::Result result;165 scopes::Result result;
@@ -165,6 +170,8 @@
165 click::web::Cancellable reviews_operation;170 click::web::Cancellable reviews_operation;
166 click::web::Cancellable submit_operation;171 click::web::Cancellable submit_operation;
167 scopes::OnlineAccountClient oa_client;172 scopes::OnlineAccountClient oa_client;
173 QSharedPointer<pay::Package> pay_package;
174 click::web::Cancellable purchase_operation;
168};175};
169176
170class DownloadErrorPreview : public PreviewStrategy177class DownloadErrorPreview : public PreviewStrategy
@@ -206,6 +213,7 @@
206 InstalledPreview(const unity::scopes::Result& result,213 InstalledPreview(const unity::scopes::Result& result,
207 const unity::scopes::ActionMetadata& metadata,214 const unity::scopes::ActionMetadata& metadata,
208 const QSharedPointer<click::web::Client>& client,215 const QSharedPointer<click::web::Client>& client,
216 const QSharedPointer<pay::Package>& ppackage,
209 const std::shared_ptr<click::DepartmentsDb>& depts);217 const std::shared_ptr<click::DepartmentsDb>& depts);
210218
211 virtual ~InstalledPreview();219 virtual ~InstalledPreview();
@@ -273,7 +281,8 @@
273 UninstalledPreview(const unity::scopes::Result& result,281 UninstalledPreview(const unity::scopes::Result& result,
274 const QSharedPointer<click::web::Client>& client,282 const QSharedPointer<click::web::Client>& client,
275 const std::shared_ptr<click::DepartmentsDb>& depts,283 const std::shared_ptr<click::DepartmentsDb>& depts,
276 const QSharedPointer<click::network::AccessManager>& nam);284 const QSharedPointer<click::network::AccessManager>& nam,
285 const QSharedPointer<pay::Package>& ppackage);
277286
278 virtual ~UninstalledPreview();287 virtual ~UninstalledPreview();
279288
@@ -292,7 +301,8 @@
292public:301public:
293 UninstallingPreview(const unity::scopes::Result& result,302 UninstallingPreview(const unity::scopes::Result& result,
294 const QSharedPointer<click::web::Client>& client,303 const QSharedPointer<click::web::Client>& client,
295 const QSharedPointer<click::network::AccessManager>& nam);304 const QSharedPointer<click::network::AccessManager>& nam,
305 const QSharedPointer<pay::Package>& ppackage);
296306
297 virtual ~UninstallingPreview();307 virtual ~UninstallingPreview();
298308
@@ -308,7 +318,8 @@
308public:318public:
309 CancellingPurchasePreview(const unity::scopes::Result& result,319 CancellingPurchasePreview(const unity::scopes::Result& result,
310 const QSharedPointer<click::web::Client>& client,320 const QSharedPointer<click::web::Client>& client,
311 const QSharedPointer<click::network::AccessManager>& nam);321 const QSharedPointer<click::network::AccessManager>& nam,
322 const QSharedPointer<pay::Package>& ppackage);
312323
313 virtual ~CancellingPurchasePreview();324 virtual ~CancellingPurchasePreview();
314325
315326
=== modified file 'libclickscope/tests/mock_pay.h'
--- libclickscope/tests/mock_pay.h 2015-06-11 19:24:18 +0000
+++ libclickscope/tests/mock_pay.h 2015-07-02 22:21:56 +0000
@@ -87,10 +87,18 @@
87 do_pay_package_verify(pkg_name);87 do_pay_package_verify(pkg_name);
88 }88 }
8989
90 bool is_refundable(const std::string& pkg_name)
91 {
92 do_is_refundable(pkg_name);
93 return refundable;
94 }
95
90 MOCK_METHOD0(setup_pay_service, void());96 MOCK_METHOD0(setup_pay_service, void());
91 MOCK_METHOD1(do_pay_package_refund, void(const std::string&));97 MOCK_METHOD1(do_pay_package_refund, void(const std::string&));
92 MOCK_METHOD1(do_pay_package_verify, void(const std::string&));98 MOCK_METHOD1(do_pay_package_verify, void(const std::string&));
99 MOCK_METHOD1(do_is_refundable, void(const std::string&));
93100
101 bool refundable = false;
94 bool success = false;102 bool success = false;
95 pay::PurchaseSet purchases;103 pay::PurchaseSet purchases;
96};104};
97105
=== modified file 'libclickscope/tests/test_pay.cpp'
--- libclickscope/tests/test_pay.cpp 2015-06-11 19:24:18 +0000
+++ libclickscope/tests/test_pay.cpp 2015-07-02 22:21:56 +0000
@@ -59,14 +59,12 @@
59 clientPtr.reset(new NiceMock<MockClient>(namPtr));59 clientPtr.reset(new NiceMock<MockClient>(namPtr));
60 package.reset(new MockPayPackage(clientPtr));60 package.reset(new MockPayPackage(clientPtr));
61 }61 }
62
63public:62public:
64 MOCK_METHOD1(purchases_callback, void(pay::PurchaseSet));63 MOCK_METHOD1(purchases_callback, void(pay::PurchaseSet));
65};64};
6665
67}66}
6867
69
70TEST_F(PayTest, testPayPackageRefundCalled)68TEST_F(PayTest, testPayPackageRefundCalled)
71{69{
72 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;70 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
7371
=== modified file 'libclickscope/tests/test_preview.cpp'
--- libclickscope/tests/test_preview.cpp 2015-05-15 19:51:22 +0000
+++ libclickscope/tests/test_preview.cpp 2015-07-02 22:21:56 +0000
@@ -35,6 +35,7 @@
35#include <gtest/gtest.h>35#include <gtest/gtest.h>
36#include <click/preview.h>36#include <click/preview.h>
37#include <fake_json.h>37#include <fake_json.h>
38#include <mock_pay.h>
38#include <click/index.h>39#include <click/index.h>
39#include <click/interface.h>40#include <click/interface.h>
40#include <click/reviews.h>41#include <click/reviews.h>
@@ -270,6 +271,7 @@
270 unity::scopes::VariantMap metadict;271 unity::scopes::VariantMap metadict;
271 QSharedPointer<click::web::Client> client;272 QSharedPointer<click::web::Client> client;
272 QSharedPointer<click::network::AccessManager> nam;273 QSharedPointer<click::network::AccessManager> nam;
274 QSharedPointer<MockPayPackage> pay_package;
273 std::shared_ptr<click::DepartmentsDb> depts;275 std::shared_ptr<click::DepartmentsDb> depts;
274 const std::string FAKE_SHA512 = "FAKE_SHA512";276 const std::string FAKE_SHA512 = "FAKE_SHA512";
275277
@@ -298,7 +300,7 @@
298 metadata.set_scope_data(unity::scopes::Variant(metadict));300 metadata.set_scope_data(unity::scopes::Variant(metadict));
299 MockablePreview preview(result, metadata);301 MockablePreview preview(result, metadata);
300 EXPECT_CALL(preview, build_installing(_, FAKE_SHA512, _, _, _, _));302 EXPECT_CALL(preview, build_installing(_, FAKE_SHA512, _, _, _, _));
301 preview.choose_strategy(client, nam, depts);303 preview.choose_strategy(client, nam, pay_package, depts);
302}304}
303305
304306
@@ -309,6 +311,7 @@
309 unity::scopes::PreviewWidgetList widgets;311 unity::scopes::PreviewWidgetList widgets;
310 QSharedPointer<click::web::Client> client;312 QSharedPointer<click::web::Client> client;
311 QSharedPointer<click::network::AccessManager> nam;313 QSharedPointer<click::network::AccessManager> nam;
314 QSharedPointer<MockPayPackage> pay_package;
312 std::shared_ptr<click::DepartmentsDb> depts;315 std::shared_ptr<click::DepartmentsDb> depts;
313 unity::scopes::testing::MockPreviewReply reply;316 unity::scopes::testing::MockPreviewReply reply;
314 std::shared_ptr<unity::scopes::testing::MockPreviewReply> replyptr{&reply, [](unity::scopes::testing::MockPreviewReply*){}};317 std::shared_ptr<unity::scopes::testing::MockPreviewReply> replyptr{&reply, [](unity::scopes::testing::MockPreviewReply*){}};
@@ -342,8 +345,10 @@
342 const unity::scopes::Result& result,345 const unity::scopes::Result& result,
343 const QSharedPointer<click::web::Client>& client,346 const QSharedPointer<click::web::Client>& client,
344 const std::shared_ptr<click::DepartmentsDb>& depts,347 const std::shared_ptr<click::DepartmentsDb>& depts,
345 const QSharedPointer<click::network::AccessManager>& nam)348 const QSharedPointer<click::network::AccessManager>& nam,
346 : click::UninstalledPreview(result, client, depts, nam), object_path(object_path),349 const QSharedPointer<pay::Package> pay_package)
350 : click::UninstalledPreview(result, client, depts, nam, pay_package),
351 object_path(object_path),
347 fake_downloader(new FakeDownloader(object_path, nam))352 fake_downloader(new FakeDownloader(object_path, nam))
348 {353 {
349354
@@ -370,8 +375,9 @@
370 const unity::scopes::Result& result,375 const unity::scopes::Result& result,
371 const QSharedPointer<click::web::Client>& client,376 const QSharedPointer<click::web::Client>& client,
372 const std::shared_ptr<click::DepartmentsDb>& depts,377 const std::shared_ptr<click::DepartmentsDb>& depts,
373 const QSharedPointer<click::network::AccessManager>& nam)378 const QSharedPointer<click::network::AccessManager>& nam,
374 : FakeBaseUninstalledPreview(object_path, result, client, depts, nam) {379 const QSharedPointer<pay::Package> pay_package)
380 : FakeBaseUninstalledPreview(object_path, result, client, depts, nam, pay_package) {
375 }381 }
376};382};
377383
@@ -381,7 +387,7 @@
381387
382 result["name"] = "fake_app_name";388 result["name"] = "fake_app_name";
383 scopes::PreviewWidgetList response;389 scopes::PreviewWidgetList response;
384 FakeUninstalledPreview preview(fake_object_path, result, client, depts, nam);390 FakeUninstalledPreview preview(fake_object_path, result, client, depts, nam, pay_package);
385 EXPECT_CALL(preview, progressBarWidget(_))391 EXPECT_CALL(preview, progressBarWidget(_))
386 .Times(1)392 .Times(1)
387 .WillOnce(Return(response));393 .WillOnce(Return(response));
@@ -394,7 +400,7 @@
394400
395 result["name"] = "fake_app_name";401 result["name"] = "fake_app_name";
396 scopes::PreviewWidgetList response;402 scopes::PreviewWidgetList response;
397 FakeUninstalledPreview preview(fake_object_path, result, client, depts, nam);403 FakeUninstalledPreview preview(fake_object_path, result, client, depts, nam, pay_package);
398 EXPECT_CALL(preview, uninstalledActionButtonWidgets(_))404 EXPECT_CALL(preview, uninstalledActionButtonWidgets(_))
399 .Times(1)405 .Times(1)
400 .WillOnce(Return(response));406 .WillOnce(Return(response));
@@ -405,13 +411,14 @@
405class FakeUninstalledRefundablePreview : FakeBaseUninstalledPreview {411class FakeUninstalledRefundablePreview : FakeBaseUninstalledPreview {
406public:412public:
407 FakeUninstalledRefundablePreview(const unity::scopes::Result& result,413 FakeUninstalledRefundablePreview(const unity::scopes::Result& result,
408 const QSharedPointer<click::web::Client>& client,414 const QSharedPointer<click::web::Client>& client,
409 const std::shared_ptr<click::DepartmentsDb>& depts,415 const std::shared_ptr<click::DepartmentsDb>& depts,
410 const QSharedPointer<click::network::AccessManager>& nam)416 const QSharedPointer<click::network::AccessManager>& nam,
411 : FakeBaseUninstalledPreview(std::string{""}, result, client, depts, nam){417 const QSharedPointer<pay::Package> pay_package)
418 : FakeBaseUninstalledPreview(std::string{""}, result, client, depts, nam, pay_package){
412 }419 }
413 using click::UninstalledPreview::uninstalledActionButtonWidgets;420 using click::UninstalledPreview::uninstalledActionButtonWidgets;
414 MOCK_CONST_METHOD0(isRefundable, bool());421 MOCK_METHOD0(isRefundable, bool());
415};422};
416423
417unity::scopes::VariantArray get_actions_from_widgets(const unity::scopes::PreviewWidgetList& widgets, int widget_number) {424unity::scopes::VariantArray get_actions_from_widgets(const unity::scopes::PreviewWidgetList& widgets, int widget_number) {
@@ -429,7 +436,7 @@
429 result["name"] = "fake_app_name";436 result["name"] = "fake_app_name";
430 result["price"] = 2.99;437 result["price"] = 2.99;
431 result["purchased"] = true;438 result["purchased"] = true;
432 FakeUninstalledRefundablePreview preview(result, client, depts, nam);439 FakeUninstalledRefundablePreview preview(result, client, depts, nam, pay_package);
433440
434 click::PackageDetails pkgdetails;441 click::PackageDetails pkgdetails;
435 EXPECT_CALL(preview, isRefundable()).Times(1)442 EXPECT_CALL(preview, isRefundable()).Times(1)
@@ -442,7 +449,7 @@
442 result["name"] = "fake_app_name";449 result["name"] = "fake_app_name";
443 result["price"] = 2.99;450 result["price"] = 2.99;
444 result["purchased"] = true;451 result["purchased"] = true;
445 FakeUninstalledRefundablePreview preview(result, client, depts, nam);452 FakeUninstalledRefundablePreview preview(result, client, depts, nam, pay_package);
446453
447 click::PackageDetails pkgdetails;454 click::PackageDetails pkgdetails;
448 EXPECT_CALL(preview, isRefundable()).Times(1)455 EXPECT_CALL(preview, isRefundable()).Times(1)
@@ -458,6 +465,7 @@
458 unity::scopes::VariantMap metadict;465 unity::scopes::VariantMap metadict;
459 QSharedPointer<click::web::Client> client;466 QSharedPointer<click::web::Client> client;
460 QSharedPointer<click::network::AccessManager> nam;467 QSharedPointer<click::network::AccessManager> nam;
468 QSharedPointer<MockPayPackage> pay_package;
461 std::shared_ptr<click::DepartmentsDb> depts;469 std::shared_ptr<click::DepartmentsDb> depts;
462470
463public:471public:
@@ -470,16 +478,17 @@
470 FakeInstalledRefundablePreview(const unity::scopes::Result& result,478 FakeInstalledRefundablePreview(const unity::scopes::Result& result,
471 const unity::scopes::ActionMetadata& metadata,479 const unity::scopes::ActionMetadata& metadata,
472 const QSharedPointer<click::web::Client> client,480 const QSharedPointer<click::web::Client> client,
481 const QSharedPointer<pay::Package> pay_package,
473 const std::shared_ptr<click::DepartmentsDb> depts)482 const std::shared_ptr<click::DepartmentsDb> depts)
474 : click::InstalledPreview(result, metadata, client, depts) {483 : click::InstalledPreview(result, metadata, client, pay_package, depts) {
475484
476 }485 }
477 using click::InstalledPreview::createButtons;486 using click::InstalledPreview::createButtons;
478 MOCK_CONST_METHOD0(isRefundable, bool());487 MOCK_METHOD0(isRefundable, bool());
479};488};
480489
481TEST_F(InstalledPreviewTest, testIsRefundableButtonShown) {490TEST_F(InstalledPreviewTest, testIsRefundableButtonShown) {
482 FakeInstalledRefundablePreview preview(result, metadata, client, depts);491 FakeInstalledRefundablePreview preview(result, metadata, client, pay_package, depts);
483 EXPECT_CALL(preview, isRefundable()).Times(1)492 EXPECT_CALL(preview, isRefundable()).Times(1)
484 .WillOnce(Return(true));493 .WillOnce(Return(true));
485 click::Manifest manifest;494 click::Manifest manifest;
@@ -490,7 +499,7 @@
490}499}
491500
492TEST_F(InstalledPreviewTest, testIsRefundableButtonNotShown) {501TEST_F(InstalledPreviewTest, testIsRefundableButtonNotShown) {
493 FakeInstalledRefundablePreview preview(result, metadata, client, depts);502 FakeInstalledRefundablePreview preview(result, metadata, client, pay_package, depts);
494 EXPECT_CALL(preview, isRefundable()).Times(1)503 EXPECT_CALL(preview, isRefundable()).Times(1)
495 .WillOnce(Return(false));504 .WillOnce(Return(false));
496 click::Manifest manifest;505 click::Manifest manifest;
@@ -501,41 +510,6 @@
501}510}
502511
503512
504class RefundableTest : public PreviewStrategyTest {
505
506};
507
508TEST_F(RefundableTest, testIsNotRefundableWhenFieldMissing) {
509 FakeResult result{vm};
510 FakePreview preview{result};
511 ASSERT_FALSE(preview.isRefundable());
512}
513
514TEST_F(RefundableTest, testIsNotRefundableWhenExpired) {
515 FakeResult result{vm};
516 time_t now = time(NULL);
517 result["refundable_until"] = (int64_t) (now - 300);
518 FakePreview preview{result};
519 ASSERT_FALSE(preview.isRefundable());
520}
521
522TEST_F(RefundableTest, testIsRefundable) {
523 FakeResult result{vm};
524 time_t now = time(NULL);
525 result["refundable_until"] = (int64_t) (now + 300);
526 FakePreview preview{result};
527 ASSERT_TRUE(preview.isRefundable());
528}
529
530TEST_F(RefundableTest, testIsNotRefundableWhenExpiringRealSoon) {
531 FakeResult result{vm};
532 time_t now = time(NULL);
533 result["refundable_until"] = (int64_t) (now + 8);
534 FakePreview preview{result};
535 ASSERT_FALSE(preview.isRefundable());
536}
537
538
539class FakeCancelPurchasePreview : public click::CancelPurchasePreview {513class FakeCancelPurchasePreview : public click::CancelPurchasePreview {
540public:514public:
541 FakeCancelPurchasePreview(const unity::scopes::Result& result, bool installed)515 FakeCancelPurchasePreview(const unity::scopes::Result& result, bool installed)
542516
=== modified file 'scope/clickapps/apps-scope.cpp'
--- scope/clickapps/apps-scope.cpp 2015-05-29 08:59:56 +0000
+++ scope/clickapps/apps-scope.cpp 2015-07-02 22:21:56 +0000
@@ -52,6 +52,8 @@
52 nam.reset(new click::network::AccessManager());52 nam.reset(new click::network::AccessManager());
53 client.reset(new click::web::Client(nam));53 client.reset(new click::web::Client(nam));
54 index.reset(new click::Index(client));54 index.reset(new click::Index(client));
55 pay_package.reset(new pay::Package(client));
56
55 try57 try
56 {58 {
57 depts_db = click::DepartmentsDb::open(false);59 depts_db = click::DepartmentsDb::open(false);
@@ -99,7 +101,7 @@
99 const unity::scopes::ActionMetadata& metadata) {101 const unity::scopes::ActionMetadata& metadata) {
100 qDebug() << "Scope::preview() called.";102 qDebug() << "Scope::preview() called.";
101 auto preview = new click::Preview(result, metadata);103 auto preview = new click::Preview(result, metadata);
102 preview->choose_strategy(client, nam, depts_db);104 preview->choose_strategy(client, nam, pay_package, depts_db);
103 return unity::scopes::PreviewQueryBase::UPtr{preview};105 return unity::scopes::PreviewQueryBase::UPtr{preview};
104}106}
105107
106108
=== modified file 'scope/clickapps/apps-scope.h'
--- scope/clickapps/apps-scope.h 2014-08-01 15:04:19 +0000
+++ scope/clickapps/apps-scope.h 2015-07-02 22:21:56 +0000
@@ -30,14 +30,15 @@
30#ifndef APPS_SCOPE_H30#ifndef APPS_SCOPE_H
31#define APPS_SCOPE_H31#define APPS_SCOPE_H
3232
33#include <click/index.h>
33#include <click/network_access_manager.h>34#include <click/network_access_manager.h>
35#include <click/pay.h>
34#include <click/webclient.h>36#include <click/webclient.h>
3537
36#include <unity/scopes/ScopeBase.h>38#include <unity/scopes/ScopeBase.h>
37#include <unity/scopes/QueryBase.h>39#include <unity/scopes/QueryBase.h>
38#include <unity/scopes/ActivationQueryBase.h>40#include <unity/scopes/ActivationQueryBase.h>
3941
40#include <click/index.h>
4142
42namespace scopes = unity::scopes;43namespace scopes = unity::scopes;
4344
@@ -67,6 +68,7 @@
67 QSharedPointer<click::network::AccessManager> nam;68 QSharedPointer<click::network::AccessManager> nam;
68 QSharedPointer<click::web::Client> client;69 QSharedPointer<click::web::Client> client;
69 QSharedPointer<click::Index> index;70 QSharedPointer<click::Index> index;
71 QSharedPointer<pay::Package> pay_package;
70 std::shared_ptr<click::DepartmentsDb> depts_db;72 std::shared_ptr<click::DepartmentsDb> depts_db;
7173
72 std::string installApplication(unity::scopes::Result const& result);74 std::string installApplication(unity::scopes::Result const& result);
7375
=== modified file 'scope/clickstore/store-scope.cpp'
--- scope/clickstore/store-scope.cpp 2015-04-24 21:30:39 +0000
+++ scope/clickstore/store-scope.cpp 2015-07-02 22:21:56 +0000
@@ -103,7 +103,7 @@
103 const unity::scopes::ActionMetadata& metadata) {103 const unity::scopes::ActionMetadata& metadata) {
104 qDebug() << "Scope::preview() called.";104 qDebug() << "Scope::preview() called.";
105 auto preview = new click::Preview(result, metadata);105 auto preview = new click::Preview(result, metadata);
106 preview->choose_strategy(client, nam, depts_db);106 preview->choose_strategy(client, nam, pay_package, depts_db);
107 return unity::scopes::PreviewQueryBase::UPtr{preview};107 return unity::scopes::PreviewQueryBase::UPtr{preview};
108}108}
109109
@@ -124,6 +124,7 @@
124 std::string download_sha512 = metadata.scope_data().get_dict()["download_sha512"].get_string();124 std::string download_sha512 = metadata.scope_data().get_dict()["download_sha512"].get_string();
125 activation->setHint("download_sha512", unity::scopes::Variant(download_sha512));125 activation->setHint("download_sha512", unity::scopes::Variant(download_sha512));
126 activation->setHint("action_id", unity::scopes::Variant(click::Preview::Actions::INSTALL_CLICK));126 activation->setHint("action_id", unity::scopes::Variant(click::Preview::Actions::INSTALL_CLICK));
127 activation->setHint("purchased", unity::scopes::Variant(true));
127 qDebug() << "returning ShowPreview";128 qDebug() << "returning ShowPreview";
128 activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);129 activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);
129 } else if (action_id == "purchaseError") {130 } else if (action_id == "purchaseError") {
@@ -144,6 +145,7 @@
144 activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);145 activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);
145 } else if (action_id == click::Preview::Actions::DOWNLOAD_COMPLETED) {146 } else if (action_id == click::Preview::Actions::DOWNLOAD_COMPLETED) {
146 activation->setHint(click::Preview::Actions::DOWNLOAD_COMPLETED, unity::scopes::Variant(true));147 activation->setHint(click::Preview::Actions::DOWNLOAD_COMPLETED, unity::scopes::Variant(true));
148 activation->setHint("installed", unity::scopes::Variant(true));
147 activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);149 activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);
148 } else if (action_id == click::Preview::Actions::CANCEL_PURCHASE_INSTALLED) {150 } else if (action_id == click::Preview::Actions::CANCEL_PURCHASE_INSTALLED) {
149 activation->setHint(click::Preview::Actions::CANCEL_PURCHASE_INSTALLED, unity::scopes::Variant(true));151 activation->setHint(click::Preview::Actions::CANCEL_PURCHASE_INSTALLED, unity::scopes::Variant(true));
150152
=== modified file 'scope/clickstore/store-scope.h'
--- scope/clickstore/store-scope.h 2015-04-14 21:19:21 +0000
+++ scope/clickstore/store-scope.h 2015-07-02 22:21:56 +0000
@@ -71,10 +71,10 @@
71 QSharedPointer<click::network::AccessManager> nam;71 QSharedPointer<click::network::AccessManager> nam;
72 QSharedPointer<click::web::Client> client;72 QSharedPointer<click::web::Client> client;
73 QSharedPointer<click::Index> index;73 QSharedPointer<click::Index> index;
74 QSharedPointer<pay::Package> pay_package;
74 std::shared_ptr<click::DepartmentLookup> depts;75 std::shared_ptr<click::DepartmentLookup> depts;
75 std::shared_ptr<click::HighlightList> highlights;76 std::shared_ptr<click::HighlightList> highlights;
76 std::shared_ptr<click::DepartmentsDb> depts_db;77 std::shared_ptr<click::DepartmentsDb> depts_db;
77 std::shared_ptr<pay::Package> pay_package;
7878
79 std::string installApplication(unity::scopes::Result const& result);79 std::string installApplication(unity::scopes::Result const& result);
80};80};

Subscribers

People subscribed via source and target branches

to all changes: