diff options
Diffstat (limited to 'libtransport/includes/hicn/transport/interfaces/callbacks.h')
-rw-r--r-- | libtransport/includes/hicn/transport/interfaces/callbacks.h | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/libtransport/includes/hicn/transport/interfaces/callbacks.h b/libtransport/includes/hicn/transport/interfaces/callbacks.h index 6ae07797e..41e4fba3b 100644 --- a/libtransport/includes/hicn/transport/interfaces/callbacks.h +++ b/libtransport/includes/hicn/transport/interfaces/callbacks.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -15,8 +15,9 @@ #pragma once +#include <hicn/transport/auth/policies.h> +#include <hicn/transport/interfaces/notification.h> #include <hicn/transport/interfaces/statistics.h> -#include <hicn/transport/interfaces/verification_policy.h> #include <functional> #include <system_error> @@ -60,6 +61,12 @@ using ConsumerTimerCallback = std::function<void(ConsumerSocket &, const TransportStatistics &stats)>; /** + * The ConsumerTimerCallback is called when the forwarding/recovery stategy is + * changes. + */ +using StrategyCallback = std::function<void(notification::Strategy strategy)>; + +/** * The ProducerContentCallback will be called by the producer socket right after * a content has been segmented and published. */ @@ -75,25 +82,6 @@ using ConsumerContentObjectCallback = std::function<void(ConsumerSocket &, const core::ContentObject &)>; /** - * The ConsumerContentObjectVerificationCallback will be called by the transport - * if an application is willing to verify each content object. Note that a - * better alternative is to instrument the transport to perform the verification - * autonomously, without requiring the intervention of the application. - */ -using ConsumerContentObjectVerificationCallback = - std::function<bool(ConsumerSocket &, const core::ContentObject &)>; - -/** - * The ConsumerContentObjectVerificationFailedCallback will be caled by the - * transport if a data packet (either manifest or content object) cannot be - * verified. The application here decides what to do by returning a - * VerificationFailedPolicy object. - */ -using ConsumerContentObjectVerificationFailedCallback = - std::function<VerificationPolicy( - ConsumerSocket &, const core::ContentObject &, std::error_code ec)>; - -/** * The ProducerContentObjectCallback will be called in different parts of the * consumer socket processing pipeline, with a ProducerSocket and an * ContentObject as parameters. |