-
Notifications
You must be signed in to change notification settings - Fork 21
Add implementation for EnumDownloads #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sdk-cpp/include/do_download.h
Outdated
| return set_property(download_property::cost_policy, static_cast<uint32_t>(value)); | ||
| } | ||
|
|
||
| // Returns existing downloads that are associated with the caller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { | ||
|
|
||
| enum class errc : int32_t | ||
| namespace errc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change to namespace? I think one of the std::error_code constructors expects enum (maybe we aren't using that c'tor today). #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I see the other changes in do_error_helpers.h and other files now.
Ignore my comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it better without the typecasts
sdk-cpp/include/do_errors.h
Outdated
| do_e_invalid_state = static_cast<int32_t>(0x80D02013), // DO_E_INVALID_STATE | ||
| }; | ||
|
|
||
| constexpr auto e_not_impl = static_cast<int32_t>(0x80004001); // E_NOTIMPL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(prefixes were not required inside the enum either)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
| ComPtr<IDOManager> manager; | ||
| RETURN_IF_FAILED(CoCreateInstance(__uuidof(DeliveryOptimization), nullptr, CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&manager))); | ||
| ComPtr<IEnumUnknown> spEnum; | ||
| RETURN_IF_FAILED(manager->EnumDownloads(pCategory, &spEnum)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct
| download2->get_property(msdo::download_property::id, downloadId2); | ||
| ASSERT_EQ(downloadId1, downloadId2); | ||
|
|
||
| download2->start_and_wait_until_completion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shishirb-MSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
shishirb-MSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
No description provided.