Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paweł Wegner
libcloudstorage
Commits
f636cbda
Commit
f636cbda
authored
Jul 11, 2016
by
Paweł Wegner
Browse files
MockProvider: future fix.
parent
a7af76ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/cloudbrowser/MockProvider.cpp
View file @
f636cbda
...
...
@@ -52,8 +52,7 @@ IItem::Pointer MockProvider::rootDirectory() const {
ICloudProvider
::
ListDirectoryRequest
::
Pointer
MockProvider
::
listDirectoryAsync
(
IItem
::
Pointer
directory
,
IListDirectoryCallback
::
Pointer
callback
)
{
return
make_unique
<
MockListDirectoryRequest
>
(
directory
,
std
::
move
(
callback
));
return
make_unique
<
MockListDirectoryRequest
>
(
directory
,
std
::
move
(
callback
));
}
ICloudProvider
::
GetItemRequest
::
Pointer
MockProvider
::
getItemAsync
(
...
...
examples/cloudbrowser/MockProvider.h
View file @
f636cbda
...
...
@@ -51,10 +51,10 @@ class MockProvider : public ICloudProvider {
MockListDirectoryRequest
(
IItem
::
Pointer
directory
,
IListDirectoryCallback
::
Pointer
callback
);
~
MockListDirectoryRequest
()
{
cancel
();
}
void
finish
()
{
result_
.
ge
t
();
}
void
finish
()
{
result_
.
wai
t
();
}
void
cancel
()
{
cancelled_
=
true
;
result_
.
ge
t
();
result_
.
wai
t
();
}
std
::
vector
<
IItem
::
Pointer
>
result
()
{
return
result_
.
get
();
}
...
...
@@ -79,8 +79,8 @@ class MockProvider : public ICloudProvider {
public:
MockDownloadFileRequest
(
IItem
::
Pointer
item
,
IDownloadFileCallback
::
Pointer
);
void
finish
()
{
function_
.
ge
t
();
}
void
cancel
()
{
function_
.
ge
t
();
}
void
finish
()
{
function_
.
wai
t
();
}
void
cancel
()
{
function_
.
wai
t
();
}
void
result
()
{
function_
.
get
();
}
private:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment