Project

General

Profile

Actions

Feature #4316

closed

Scoped expressed Interest

Added by Junxiao Shi about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Base
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Provide a type to hold a PendingInterestId. When exiting the scope containing an instance of that type, the pending Interest is cancelled.


Related issues 3 (0 open3 closed)

Related to ndn-cxx - Feature #4698: Improve ScopedEventIdClosedJunxiao Shi

Actions
Related to ndn-cxx - Feature #3919: Scoped prefix registrationClosedJunxiao Shi

Actions
Precedes ndn-cxx - Task #4885: Remove deprecated const Id* of face-related handlesClosedDavide Pesavento

Actions
Actions #1

Updated by Junxiao Shi over 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
  • Target version set to v0.7
Actions #2

Updated by Junxiao Shi about 6 years ago

From https://gerrit.named-data.net/c/ndn-cxx/+/4876/1/src/face-scoped-id.hpp#31

Ideally we should change the return type of registerPrefix and friends to return a (non-scoped) handle directly rather than a weird pointer type. The non-scoped handle type can be implicitly assigned to the scoped handle type. That would substantially improve usability for new API consumers because they don't have to separately construct the scoped handle passing a Face object, which is ugly. Backward compat for the new return type can be achieved by adding a conversion operator from the handle type to the current pointer type.

I agree and this applies to scheduler::ScopedEventId as well.

Actions #3

Updated by Davide Pesavento about 6 years ago

Actions #4

Updated by Junxiao Shi about 6 years ago

  • % Done changed from 0 to 10

Change 4876 patchset 2 attempts note-2 design, but it seems that the implicit conversion operator is ineffective:

../src/mgmt/dispatcher.cpp: In member function ‘void ndn::mgmt::Dispatcher::addTopPrefix(const ndn::Name&, bool, const ndn::security::SigningInfo&)’:
../src/mgmt/dispatcher.cpp:82:39: error: no match for ‘operator=’ (operand types are ‘nonstd::optional_lite::optional<const ndn::RegisteredPrefixId*>’ and ‘ndn::RegisteredPrefixHandle’)
Actions #5

Updated by Davide Pesavento about 6 years ago

Junxiao Shi wrote:

Change 4876 patchset 2 attempts note-2 design, but it seems that the implicit conversion operator is ineffective:

Well, it's failing because the LHS is an optional type... Dispatcher::TopPrefixEntry is using optional<const RegisteredPrefixId*>, which is not something I was expecting since it doesn't make much sense (pointers are intrinsically nullable). I would get rid of the optional and not worry too much about these cases.

Actions #6

Updated by Junxiao Shi almost 6 years ago

  • % Done changed from 10 to 50

https://gerrit.named-data.net/5163 implements the same design as scoped Interest filter.

After this is merged, I plan to do another round of refactoring to deprecate conversions of XHandle to const XId*.

Actions #7

Updated by Junxiao Shi almost 6 years ago

  • % Done changed from 50 to 80

https://gerrit.named-data.net/5198 deprecates Id types in favor of Handle types.
NFD and PSync aren't affected.
https://gerrit.named-data.net/5199 updates ndn-tools.
https://gerrit.named-data.net/5200 updates repo-ng.
I will check ChronoSync, NLSR, and NAC later.

Actions #9

Updated by Junxiao Shi over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100
Actions #10

Updated by Davide Pesavento over 5 years ago

  • Precedes Task #4885: Remove deprecated const Id* of face-related handles added
Actions #11

Updated by Davide Pesavento over 5 years ago

Actions

Also available in: Atom PDF