Commit Graph
19 Commits
Author SHA1 Message Date
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
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 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 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 c169a81a5c src: Switching to LGPL 3.0 license
Change-Id: Iabc3356c332be7c37ecbf5f0902328054b79f177
Refs: #1628
2014-05-23 17:32:08 -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 151a855a1a docs: Extending documentation and manpages
Refs: #1462

Change-Id: If33a0f3c623daf3502ed301bcdc63892779463e3
2014-04-16 16:20:41 -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
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 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
Yingdi Yu 61ec2726de renaming: ndn-cpp to ndn-cpp-dev
Change-Id: Iff3e4ff53a0005b7dd35c57d03da76b347170d03
2014-01-20 15:35:52 -08:00
Alexander Afanasyev c4b75981fd examples: Add very basic consumer/producer apps
Change-Id: I3c80448b3894f0609a15596bf16c8833ab2f8add
2014-01-09 15:14:32 -08:00