47 Commits
Author SHA1 Message Date
Davide Pesavento 2f46d6543e Avoid deprecated Boost.Asio interfaces
Change-Id: I00d285893ff61619f49dff8a8a55d0d0e2c309a7
2023-11-10 17:40:43 -05:00
Davide Pesavento c996742bad build: use python f-strings
Change-Id: I17695613bb737ac4ba297468c5859ceb18bfdf96
2023-09-07 22:04:34 -04:00
Davide Pesavento 296c3a185d interest+data: add string_view overloads for convenience
Also, explicitly declare the nullptr_t overloads as deleted, so that
users get a clear compilation error instead of a potentially confusing
"ambiguous overload" if they try to pass nullptr to these functions.

Change-Id: I399efcbd698a0d3f7e29219d21eb1a53a1d71070
2023-05-10 22:56:48 -04:00
Davide Pesavento 152ef44da9 Move BOOST_CONCEPT_ASSERT to unit tests where possible
Change-Id: I0c6ae494eb7be4ab2ff422ba6d866ead9e75f4eb
2023-04-22 02:02:29 -04:00
Davide Pesavento 3fdb02f62e Use std::string_view in several APIs
Change-Id: I2c13b229162b247738cbf46d6bf71fc69d45816f
2023-04-14 04:05:08 -04:00
Alexander Afanasyev 5b06597e84 example: Squish one deprecation warning
Change-Id: I7aa36ae7b344fb6865c4b111ae69eab4aac4e0ca
2022-03-25 10:12:57 -07:00
Davide Pesavento aee2ada5f0 interest: remove deprecated setDefaultCanBePrefix()
Change-Id: Ifaffb7cc7772a31c3b396c60b816e783d70b7041
2022-02-18 14:43:02 -05:00
Alexander Afanasyev d1b6f95864 examples: Extend example with basic trust schema (validator-config)
Change-Id: Iaf9f4abd57563e52cb167b55ba3b27d8ecc1ecd7
2021-12-24 16:44:03 -05:00
Davide Pesavento 2e481fc28d common: stop importing std::{bind,ref,cref} into namespace ndn
And reduce the usage of std::bind() throughout the codebase.
C++14 lambdas are easier to understand for humans and more
likely to be optimized by the compiler.

Change-Id: Ia59fad34539710f8801c52914896ce426fb7e538
2021-07-31 19:29:06 -04:00
Zhiyi Zhang 8b0344d4bc examples: fix "CanBePrefix unset" warning and general cleanup
refs: #4581
Change-Id: Ia1955e1c1eb746221adc88bfde093d5eadbd88e5
2019-06-28 11:36:19 -04:00
Junxiao Shi a5f233e103 util: rename Scheduler::scheduleEvent to schedule
Deprecate Scheduler::scheduleEvent and Scheduler::cancelEvent

refs #4883

Change-Id: I2bb16922aff04300d92dfd276dd436958a96929a
2019-03-18 09:39:22 -06:00
Davide Pesavento 1944281719 Rename 'src' directory to 'ndn-cxx'
Change-Id: I14394023680901a86977313ca87fb017333614dd
Refs: #3084
2018-11-23 18:27:19 -05:00
Davide Pesavento 0f8308012b util: add literal operators for duration types
Change-Id: I007fa61c80e535c6e4b12e85a32eeeee62fecc3c
Refs: #4468
2018-01-18 21:23:05 -05:00
Davide Pesavento 4d0d096b2e Fix compilation with boost 1.66.0
Change-Id: Ibf2883a974c834a5281c39a551e6d467d4454501
2017-12-19 22:37:15 -05:00
Davide Pesavento cdcde90588 Fix compilation with Boost 1.65.0
Change-Id: I6f56d6bf135d9c862b04cb086340301ee98ef0ed
Refs: #4256
2017-08-23 22:24:40 -04:00
Weiwei Liu ab9aad0d48 examples: handle Nack in consumer
refs #3701
Change-Id: Ia6cfcefcf5a9541b09a50d1e5edaa55227908191
2016-10-11 16:42:08 -07:00
Steve DiBenedetto 9fcc24fd75 docs: improve example applications
refs: #1976

Change-Id: I82e719ac497d3cb4eab74c1c6d02bcaa050388eb
2015-01-16 14:59:49 -08:00
Alexander Afanasyev 28d0d94a67 build: Support tools and examples with multiple translation units
Change-Id: I71a5690391464d8275b91f55e914c004eed4f360
Refs: #2344
2015-01-06 13:00:54 -08:00
Alexander Afanasyev b6783065ae examples: Do not use /localhost prefix in examples
This change is to avoid a common problem of running examples on separate
machines.  The use of /localhost prefix, due to name-based scoping,
restricts the example programs to run on a single machine.

Change-Id: Id9f753fb7d097411b77b6227c6518679849d4411
2014-06-13 13:03:25 -07:00
Alexander Afanasyev 24b75c8930 src: Minor corrections and improvements
Change-Id: If1041d13b7c469e64e3523297438067baf96b1d6
2014-05-31 16:01:41 +03:00
Alexander Afanasyev c169a81a5c src: Switching to LGPL 3.0 license
Change-Id: Iabc3356c332be7c37ecbf5f0902328054b79f177
Refs: #1628
2014-05-23 17:32:08 -07:00
Alexander Afanasyev 9c57818289 src: Making use of DEPRECATED macro and updating library code not to use deprecated methods
Change-Id: Ibe17977e7fcbb759a26dbe1cfa3d472598e49bcc
2014-05-15 23:49:41 -07:00
Alexander Afanasyev b67090ad35 build+tests: Fixing c++11 mode compilation and correcting integrated test with faces
Change-Id: I32e34d6b2ee8cfd85ec83f62323dd7a51f2238d6
2014-04-30 16:03:27 -07:00
Alexander Afanasyev dfa52c4400 docs: Updating documentation and license boilerplates in all files
Change-Id: I321fb0d85aaddf9150ed496fe03ee0e4dc738761
2014-04-25 09:22:29 -07:00
Alexander Afanasyev 766cea7931 ====== Renaming library to ndn-cxx ======
Dependent applications should perform the following changes:

* all includes should be changed from <ndn-cpp-dev/...> to <ndn-cxx/...>
* documentation files/comments referring to ndn-cpp-dev should be
  updated and refer to ndn-cxx
* if the app uses pkgconfig for dependency detection, 'libndn-cpp-dev'
  should be replaced with 'libndn-cxx'.  Example for waf users:

    conf.check_cfg(package = 'libndn-cxx', args = ['--cflags', '--libs'],
                   uselib_store = 'NDN_CXX', mandatory = True)

Change-Id: I92d9ec7ff176b9fe8b4352bf04bbb32aa810422d
Refs: #1491
2014-04-24 22:49:51 -07:00
Alexander Afanasyev dbfb16fd8f examples: Fixing regression with Producer example (incorrect use of setContent)
Change-Id: Ie319fafc51de1b92bfccfca2bfb043f818163f5a
2014-04-19 17:14:31 -07:00
Alexander Afanasyev 151a855a1a docs: Extending documentation and manpages
Refs: #1462

Change-Id: If33a0f3c623daf3502ed301bcdc63892779463e3
2014-04-16 16:20:41 -07:00
Alexander Afanasyev b1db7c6664 build: Warnings correction for gcc 4.2
Also in this commit some code style corrections.

Change-Id: Idf2b5b96b328fb3dbea7440362c84d7759a10ec5
Refs: #1429
2014-04-03 16:17:46 -07:00
Alexander Afanasyev aa0e7dad62 all: Refactoring work with time using boost::chrono
Now the library has two clocks: time::steady_clock and
time::system_clock, following (boost|std)::chrono.  In addition to
standard now() method, the library contains several helpers to convert
to/from UnixTimestamp (microsecond resolution) and IsoString (optional
microsecond resolution).  The IsoString conversions use
boost::posix_time routines, since boost::chrono supports extended IO
support only starting boost version 1.52 (Boost Chrono V2).

This commit breaks compatibility with previous API.  All time-related
Data/Interest calls must explicitly use time units to specify
FreshnessPeriod/InterestLifetime.

Brief usage/conversion guide:

- creation of time units does not support double/float types.  If
  necessary to create time unit from double, ``ndn::duration<double>`` (for
  seconds) needs to be used instead.  In some cases, this would also
  require ``ndn::duration_cast``, if the target is not ``ndn::nanoseconds``.
- ndn::getNow, ndn::ndn_getNowMilliseconds, ndn::time::now are all
  removed in favor of the now() method in a specific clock:

    * time::system_clock::now();
    * time::steady_clock::now();

- When necessary to convert system_clock::TimePoint to unix timestamp,
  ``time::toUnixTimestamp`` can be used.  This method return number of
  milliseconds since UNIX epoch as ``ndn::time::milliseconds`` type.
  Use count() method to obtain number as an integral value.

Change-Id: Icd688bc6766e008d60c3d2888173627874526e47
Refs: #1152
2014-03-18 16:19:53 -07:00
Yingdi Yu be4150e30a security: Adjust unlocking TPM process.
Change-Id: Iee8787bb9aaa8e05fab9544bd35ce9fe31eecf29
2014-02-19 16:25:36 -08:00
Alexander Afanasyev 29e5c3dc77 encoding: Fixing Block (and as a result Name) encoding bugs
As of this commit, all non-const operations on Block will call resetWire
to remove all references to the wire, so it will be recreated next time
"encode" method is called.  Also, all getter methods now have only const
versions and non-const access to the internal data structure is
prohibited.

Change-Id: If4b485dd62541d9d4d168a44490068e4deff56c1
2014-02-11 00:01:10 -08:00
Alexander Afanasyev 0222fba8b7 api: Major API change. OnInterest/OnData callbacks now use just references, not shared pointers
If shared pointer is necessary, it can be obtained using
.shared_from_this() on Interest or Data object.

This commit also corrects all internal uses of expressInterest/setIntersetFilter.

Change-Id: I20207a5789fd189902f2c6e3827260b6b27a2514
2014-02-09 23:21:54 -08:00
Alexander Afanasyev e289b53899 face: Implementing nfd::Controller
This commit also adds an option for Node constructor to use
nfd::Controller instead of default ndnd::Controller to set interest
filter (register prefix).

Change-Id: If395756c1b98abe909cec0967c07d347affe5928
2014-02-09 23:21:54 -08:00
Alexander Afanasyev 59efe105e9 build: Disabling shared library (only static library is compiled) and disabling installation of tests and examples
Change-Id: I5a467ba7f032776863a9d32858684bde847e47d8
2014-01-29 15:56:30 -08:00
Alexander Afanasyev f6468892d3 util: Importing scheduler, originally implemented in NFD
The scheduler uses monotonic clock whenever available.

This commit also includes an example to show how to work with the
scheduler.

Change-Id: I006bcc6afddd33caa8d1ec9575c0596234315411
2014-01-29 11:15:04 -08:00
Alexander Afanasyev 09c613f782 src: Another round of source updates: moving all headers close to implementation files
Change-Id: I3d47076504950e67746174623c75383948e9d93d
2014-01-29 10:28:39 -08:00
Alexander Afanasyev 1e0a07782d build: Fixing build and unit tests
Use only C++ and boost methods (memory copying, comparison, time
operations), which are guaranteed to be present on all platforms
with C++ and boost libraries.

Change-Id: Ia2883555c55909a4f7a877cf6d5fbd49b12c73c8
2014-01-28 21:26:47 -08:00
Alexander Afanasyev 200dd6f549 build: Finalizing build system conversion
Change-Id: I9ee2e9582ebf7b47054681b26c9ef166d96e0b6b
2014-01-28 19:04:25 -08:00
Alexander Afanasyev d409d59b7a build: Finalizing waf building system (removing legacy code)
Change-Id: Ie7e7cc84e19551e3dd5dd0405b14f289ea54e7cd
2014-01-28 18:37:15 -08:00
Alexander Afanasyev a1ae0a133b build: Adding waf as a build system
Change-Id: If5074b252bc30c2fdcc28ae94cb7ad2858a25d9f
2014-01-28 15:27:35 -08:00
Yingdi Yu 61ec2726de renaming: ndn-cpp to ndn-cpp-dev
Change-Id: Iff3e4ff53a0005b7dd35c57d03da76b347170d03
2014-01-20 15:35:52 -08:00
Alexander Afanasyev a1a0c24543 build: Correcting dependencies in [examples/tests/tests_boost]/Makefile.am so the code can be compiled on Linux
Change-Id: I755faa16f3c1eb5b3a8f89a46a67533ef7efb89c
2014-01-16 21:52:47 -08:00
Alexander Afanasyev 22a315f97f examples: Make producer.cpp to use default KeyChain
Change-Id: I2d33c8cd81c453272f175ff226214ff42d450465
2014-01-16 21:29:37 -08:00
Yingdi Yu f4330ee755 tests+Makefile: updates corresponding to refactored KeyChain and related classes
Change-Id: I0c80e3bc5043764090569ea75edf56c5b799eb7d
2014-01-14 21:02:53 -08:00
Alexander Afanasyev 3e7788b51d security+examples+tests: Updating examples and tests for the updated security API
Change-Id: Ie3f37bf3d0002a35333812b0dec582e7d3567d42
2014-01-13 12:56:36 -08:00
Alexander Afanasyev 84c2bd449e tests: Porting forwarding entry test and fixing app tests
Change-Id: Ia6d2a0b39a1105c0873f873bbd4fce49dabb3cca
2014-01-09 23:34:54 -08:00
Alexander Afanasyev c4b75981fd examples: Add very basic consumer/producer apps
Change-Id: I3c80448b3894f0609a15596bf16c8833ab2f8add
2014-01-09 15:14:32 -08:00