Documentation
/*
==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--

R50

Copyright (C) 2018-2019, 2021-2025  Anonymous

There are several releases over multiple years,
they are listed as ranges, such as: "2018-2019".

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
*/

//! # Shared stuff

use dia_args::docs::Project;

/// # Server address
pub const SERVER_ADDRESS: &[u8] = &[
    0x00,
    0xdf, 0xb5, 0x42, 0x8e, 0x3f, 0x9e, 0x22, 0x27, 0xd0, 0xf2, 0x7a, 0x18, 0x89, 0xaa, 0xa8, 0x12, 0xf7, 0x94, 0x21, 0xc0, 0xe8, 0xd1, 0x75,
    0x90, 0x64, 0xaf, 0x2e, 0xa9, 0x28, 0xa5, 0xcf, 0x2c, 0x40, 0x5b, 0x65, 0x60, 0x94, 0x4e, 0x17, 0xdb, 0xa6, 0x3a, 0x16, 0x48, 0x17, 0xdd,
    0xdd, 0xf5, 0x77, 0x86, 0x7c, 0xa4, 0xc9, 0x55, 0xd9, 0xb0, 0xa6, 0x39, 0x01, 0xf8, 0xc3, 0xd9, 0x6a, 0xa4,
];

/// # Debug server address
pub const DEBUG_SERVER_ADDRESS: &[u8] = &[
    0x00,
    0x69, 0xc1, 0x12, 0x1d, 0x40, 0x7a, 0x24, 0x80, 0xa5, 0xec, 0xd9, 0x29, 0x30, 0x36, 0x0d, 0x2c, 0xee, 0xae, 0xac, 0x7f, 0xa6, 0x74, 0x42,
    0xc3, 0x5d, 0xaf, 0xa9, 0xe5, 0x2e, 0xed, 0x24, 0x46, 0x94, 0x1c, 0xc8, 0x3c, 0xb4, 0x36, 0xc6, 0x2d, 0xd2, 0xd4, 0xc4, 0xc6, 0x6a, 0x2e,
    0x54, 0xa1, 0x68, 0x32, 0x7f, 0xe6, 0x1a, 0x09, 0xac, 0x69, 0xbf, 0x34, 0x4f, 0x1f, 0xf5, 0xe9, 0xfe, 0x98,
];

/// # ID of IOE
pub const ID_OF_IOE: &[u8] = &[
    0xb6, 0x0b, 0xe5, 0x1f, 0x35, 0xa5, 0x7a, 0xa7, 0x36, 0x4f, 0x52, 0x64, 0xa5, 0x18, 0xb1, 0x83, 0x55, 0x6b, 0xac, 0xdd, 0xc5, 0x46, 0xb1,
    0x5b, 0xe7, 0x85, 0xfc, 0xfb, 0x14, 0x71, 0x0f, 0x50, 0x64, 0x24, 0xe7, 0xf7, 0x6d, 0x5e, 0xd7, 0x10, 0x37, 0x97, 0xa0, 0x60, 0xf3, 0x4d,
    0x26, 0x2a, 0xe8, 0x52, 0x69, 0x23, 0xbb, 0xa9, 0xe1, 0x7b, 0x90, 0x51, 0x9a, 0x66, 0x2a, 0xef, 0xe0, 0x87,
];

/// # Makes new project
pub fn project<'a>() -> Option<Project<'a>> {
    Some(Project::new(
        None,
        "GNU Lesser General Public License, either version 3, or (at your option) any later version",
        None,
    ))
}

#[test]
fn tests() {
    assert_ne!(SERVER_ADDRESS, DEBUG_SERVER_ADDRESS);
    for addr in &[SERVER_ADDRESS, DEBUG_SERVER_ADDRESS] {
        assert!(addr.is_empty() == false && addr[0] == 0 && addr.len() <= 90);
    }

    assert!(project().is_some());
}