Skip to content

Commit

Permalink
merge: pull request #11 from namib-project/bump-version-022
Browse files Browse the repository at this point in the history
Bump version to 0.2.2 and update copyright notices
  • Loading branch information
pulsastrix committed May 24, 2023
2 parents 658efa6 + 9e9f491 commit 6dc62ca
Show file tree
Hide file tree
Showing 30 changed files with 142 additions and 39 deletions.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# SPDX-License-Identifier: EPL-1.0 OR BSD-3-CLAUSE
# SPDX-License-Identifier: BSD-2-Clause
# Cargo.toml for the libcoap-rs repository.
# This file is part of the libcoap-rs library, see the README and LICENSE files for
# more information and terms of use.
# Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
# See the README as well as the LICENSE file for more information.
[workspace]
members = [
"libcoap",
Expand Down
4 changes: 2 additions & 2 deletions LICENSE-BSD-2-CLAUSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2021 The NAMIB Project Developers
Copyright © 2021-2023 The NAMIB Project Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -22,4 +22,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 4 additions & 3 deletions libcoap-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-License-Identifier: BSD-2-Clause
# Cargo.toml for libcoap-sys
# Copyright (c) 2021-2022 The NAMIB Project Developers, all rights reserved.
# See the README as well as the LICENSE file for more information.
# This file is part of the libcoap-sys crate, see the README and LICENSE files for
# more information and terms of use.
# Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.

[package]
name = "libcoap-sys"
description = "Raw bindings to the libcoap CoAP library."
version = "0.2.1+libcoap-4.3.1"
version = "0.2.2+libcoap-4.3.1"
edition = "2021"
license = "BSD-2-Clause AND BSD-1-Clause"
links = "coap-3"
Expand Down
4 changes: 3 additions & 1 deletion libcoap-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: BSD-2-CLAUSE
/*
* build.rs - build script for libcoap Rust bindings.
* Copyright (c) 2021 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-sys crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

Expand Down
5 changes: 4 additions & 1 deletion libcoap-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* lib.rs - Main library entry point for raw libcoap bindings.
* Copyright (c) 2021-2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-sys crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Auto-generated unsafe bindings to [libcoap](https://github.com/obgm/libcoap), generated using
//! [bindgen](https://crates.io/crates/bindgen).
//!
Expand Down
5 changes: 4 additions & 1 deletion libcoap-sys/src/wrapper.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* wrapper.h - wrapper header to generate libcoap Rust bindings using bindgen
* Copyright (c) 2021 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-sys crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

#include <coap3/coap.h>
9 changes: 5 additions & 4 deletions libcoap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-License-Identifier: BSD-2-Clause
# Cargo.toml for libcoap
# Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
# See the README as well as the LICENSE file for more information.
# This file is part of the libcoap-rs crate, see the README and LICENSE files for
# more information and terms of use.
# Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.

[package]
name = "libcoap-rs"
description = "An idiomatic wrapper around the libcoap CoAP library for Rust."
version = "0.2.1"
version = "0.2.2"
edition = "2021"
license = "BSD-2-Clause"
readme = "README.md"
Expand All @@ -27,7 +28,7 @@ nightly = []
vendored = ["libcoap-sys/vendored"]

[dependencies]
libcoap-sys = { version = "^0.2.1", path = "../libcoap-sys" }
libcoap-sys = { version = "^0.2.2", path = "../libcoap-sys" }
libc = { version = "^0.2.95" }
num-derive = { version = "^0.3.3" }
num-traits = { version = "^0.2.14" }
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/context.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* context.rs - CoAP context related code.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Module containing context-internal types and traits.

use std::{any::Any, ffi::c_void, fmt::Debug, marker::PhantomData, net::SocketAddr, ops::Sub, time::Duration};
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/crypto.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* crypto.rs - CoAP cryptography provider interfaces and types.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Cryptography provider interfaces and types

use std::{
Expand Down
6 changes: 5 additions & 1 deletion libcoap/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* error.rs - CoAP error types.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Error types

use std::string::FromUtf8Error;

use thiserror::Error;
Expand Down
6 changes: 5 additions & 1 deletion libcoap/src/event.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* event.rs - Event handling traits and logic for the libcoap Rust Wrapper.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Event handling-related code

use std::fmt::Debug;

use libcoap_sys::{coap_event_t, coap_session_get_context, coap_session_t};
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* lib.rs - Main library entry point for safe libcoap bindings.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

#![cfg_attr(feature = "nightly", feature(trait_upcasting))]

//! A safe wrapper around the libcoap C library.
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/mem.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* mem.rs - Memory handling helper structs and traits for the libcoap Rust Wrapper.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Code related to memory handling, especially for passing objects through FFI

use std::cell::{Ref, RefCell, RefMut};
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/message/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* message.rs - Types related to CoAP messages.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Types related to message handling, parsing and creation.
//!
//! The base unit that is transmitted between a CoAP client and a CoAP server is called a CoAP
Expand Down
9 changes: 6 additions & 3 deletions libcoap/src/message/request.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use std::fmt::{Display, Formatter};
// SPDX-License-Identifier: BSD-2-Clause
/*
* request.rs - Types wrapping messages into requests and responses.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* request.rs - Types wrapping messages into requests.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

use std::fmt::{Display, Formatter};
use std::str::FromStr;

use url::Url;
Expand Down
9 changes: 9 additions & 0 deletions libcoap/src/message/response.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* response.rs - Types wrapping messages into responses.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

use crate::error::{MessageConversionError, MessageTypeError, OptionValueError};
use crate::message::{CoapMessage, CoapMessageCommon, CoapOption};
use crate::protocol::{
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/protocol.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* protocol.rs - Types representing CoAP protocol values.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Various types that are specified and defined in the CoAP standard and its extensions.

use std::{
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/resource.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* resource.rs - Types relating to CoAP resource management.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Resource and resource handler descriptions

use std::{
Expand Down
4 changes: 3 additions & 1 deletion libcoap/src/session/client.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* session/client.rs - Types relating to client-side CoAP sessions.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

Expand Down
4 changes: 3 additions & 1 deletion libcoap/src/session/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* session/mod.rs - Types relating to generic CoAP sessions.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

Expand Down
4 changes: 3 additions & 1 deletion libcoap/src/session/server.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* session/server.rs - Types relating to client-side CoAP sessions.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

Expand Down
10 changes: 5 additions & 5 deletions libcoap/src/transport/dtls.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* transport/dtls.rs - transport-specific code for DTLS.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

use std::net::SocketAddr;

use libcoap_sys::{coap_endpoint_t, coap_free_endpoint, coap_new_endpoint, coap_proto_t::COAP_PROTO_DTLS};

use crate::{
context::CoapContext, error::EndpointCreationError, transport::EndpointCommon,
types::CoapAddress,
};
use crate::{context::CoapContext, error::EndpointCreationError, transport::EndpointCommon, types::CoapAddress};

#[derive(Debug)]
pub struct CoapDtlsEndpoint {
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/transport/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* transport/mod.rs - Module file for CoAP transports.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

use std::os::raw::c_uint;

use libcoap_sys::{coap_endpoint_set_default_mtu, coap_endpoint_t};
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/transport/tcp.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* transport/dtls.rs - transport-specific code for TCP.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

/// TODO
#[allow(dead_code)]
#[cfg(feature = "tcp")]
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/transport/tls.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* transport/dtls.rs - transport-specific code for TLS.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

/// TODO
#[allow(dead_code)]
#[cfg(feature = "tcp")]
Expand Down
6 changes: 4 additions & 2 deletions libcoap/src/transport/udp.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* transport/dtls.rs - transport-specific code for UDP.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

use std::net::SocketAddr;

use libcoap_sys::{coap_endpoint_t, coap_free_endpoint, coap_new_endpoint, coap_proto_t::COAP_PROTO_UDP};


use crate::{context::CoapContext, error::EndpointCreationError, transport::EndpointCommon, types::CoapAddress};

#[derive(Debug)]
Expand Down
5 changes: 4 additions & 1 deletion libcoap/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: BSD-2-Clause
/*
* resource.rs - Types for converting between libcoap and Rust data structures.
* Copyright (c) 2022 The NAMIB Project Developers, all rights reserved.
* This file is part of the libcoap-rs crate, see the README and LICENSE files for
* more information and terms of use.
* Copyright © 2021-2023 The NAMIB Project Developers, all rights reserved.
* See the README as well as the LICENSE file for more information.
*/

//! Types required for conversion between libcoap C library abstractions and Rust types.

use std::fmt::{Display, Formatter};
Expand Down
Loading

0 comments on commit 6dc62ca

Please sign in to comment.