mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
Set up a new smtp module. It will be based on https://github.com/Relintai/gdMail .
This commit is contained in:
parent
b324675489
commit
f6c504534a
44
modules/smtp/COPYRIGHT.txt
Normal file
44
modules/smtp/COPYRIGHT.txt
Normal file
@ -0,0 +1,44 @@
|
||||
# Exhaustive licensing information for files in the Godot Engine repository
|
||||
# =========================================================================
|
||||
#
|
||||
# This file aims at documenting the copyright and license for every source
|
||||
# file in the Godot Engine repository, and especially outline the files
|
||||
# whose license differs from the MIT/Expat license used by Godot Engine.
|
||||
#
|
||||
# It is written as a machine-readable format following the debian/copyright
|
||||
# specification. Globbing patterns (e.g. "Files: *") mean that they affect
|
||||
# all corresponding files (also recursively in subfolders), apart from those
|
||||
# with a more explicit copyright statement.
|
||||
#
|
||||
# Licenses are given with their debian/copyright short name (or SPDX identifier
|
||||
# if no standard short name exists) and are all included in plain text at the
|
||||
# end of this file (in alphabetical order).
|
||||
#
|
||||
# Disclaimer for thirdparty libraries:
|
||||
# ------------------------------------
|
||||
#
|
||||
# Licensing details for thirdparty libraries in the 'thirdparty/' directory
|
||||
# are given in summarized form, i.e. with only the "main" license described
|
||||
# in the library's license statement. Different licenses of single files or
|
||||
# code snippets in thirdparty libraries are not documented here.
|
||||
# For example:
|
||||
# Files: ./thirdparty/zlib/
|
||||
# Copyright: 1995-2017, Jean-loup Gailly and Mark Adler
|
||||
# License: Zlib
|
||||
# The exact copyright for each file in that library *may* differ, and some
|
||||
# files or code snippets might be distributed under other compatible licenses
|
||||
# (e.g. a public domain dedication), but as far as Godot Engine is concerned
|
||||
# the library is considered as a whole under the Zlib license.
|
||||
#
|
||||
# Nota: When linking dynamically against thirdparty libraries instead of
|
||||
# building them into the Godot binary, you may remove the corresponding
|
||||
# license details from this file.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Files: modules/smtp/*
|
||||
Comment: SMTP Module
|
||||
Copyright: Copyright (c) 2024-present Péter Magyar
|
||||
Copyright (c) 2021-2024 Nicolò Santilio
|
||||
License: Expat
|
||||
|
22
modules/smtp/LICENSE
Normal file
22
modules/smtp/LICENSE
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024-present Péter Magyar
|
||||
Copyright (c) 2021-2024 Nicolò Santilio
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
25
modules/smtp/SCsub
Normal file
25
modules/smtp/SCsub
Normal file
@ -0,0 +1,25 @@
|
||||
import os
|
||||
|
||||
Import('env')
|
||||
|
||||
module_env = env.Clone()
|
||||
|
||||
sources = [
|
||||
"register_types.cpp",
|
||||
|
||||
"email.cpp",
|
||||
"smtp_client.cpp",
|
||||
]
|
||||
|
||||
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
||||
# Shared lib compilation
|
||||
module_env.Append(CCFLAGS=['-fPIC'])
|
||||
module_env['LIBS'] = []
|
||||
shared_lib = module_env.SharedLibrary(target='#bin/smtp', source=sources)
|
||||
shared_lib_shim = shared_lib[0].name.rsplit('.', 1)[0]
|
||||
env.Append(LIBS=[shared_lib_shim])
|
||||
env.Append(LIBPATH=['#bin'])
|
||||
else:
|
||||
# Static compilation
|
||||
module_env.add_source_files(env.modules_sources, sources)
|
||||
|
22
modules/smtp/config.py
Normal file
22
modules/smtp/config.py
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
#return False
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
||||
|
||||
def get_doc_classes():
|
||||
return [
|
||||
"EMail",
|
||||
"SMTPClient",
|
||||
]
|
||||
|
||||
def get_doc_path():
|
||||
return "doc_classes"
|
||||
|
||||
def get_license_file():
|
||||
return "COPYRIGHT.txt"
|
||||
|
13
modules/smtp/doc_classes/EMail.xml
Normal file
13
modules/smtp/doc_classes/EMail.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="EMail" inherits="Reference" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
13
modules/smtp/doc_classes/SMTPClient.xml
Normal file
13
modules/smtp/doc_classes/SMTPClient.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SMTPClient" inherits="Node" version="4.2">
|
||||
<brief_description>
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
</class>
|
42
modules/smtp/email.cpp
Normal file
42
modules/smtp/email.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
/*************************************************************************/
|
||||
/* email.cpp */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE'S SMTP MODULE */
|
||||
/* https://github.com/Relintai/pandemonium_engine */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2022-present Péter Magyar. */
|
||||
/* Copyright (c) 2021-2024 Nicolò Santilio */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "email.h"
|
||||
|
||||
EMail::EMail() {
|
||||
}
|
||||
EMail::~EMail() {
|
||||
}
|
||||
|
||||
void EMail::_bind_methods() {
|
||||
//ClassDB::bind_method(D_METHOD("get_ignored_urls"), &EMail::get_ignored_urls);
|
||||
//ClassDB::bind_method(D_METHOD("set_ignored_urls", "val"), &EMail::set_ignored_urls);
|
||||
//ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "ignored_urls"), "set_ignored_urls", "get_ignored_urls");
|
||||
}
|
47
modules/smtp/email.h
Normal file
47
modules/smtp/email.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef EMAIL_H
|
||||
#define EMAIL_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* email.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE'S SMTP MODULE */
|
||||
/* https://github.com/Relintai/pandemonium_engine */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2022-present Péter Magyar. */
|
||||
/* Copyright (c) 2021-2024 Nicolò Santilio */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "core/object/reference.h"
|
||||
|
||||
class EMail : public Reference {
|
||||
GDCLASS(EMail, Reference);
|
||||
|
||||
public:
|
||||
EMail();
|
||||
~EMail();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
};
|
||||
|
||||
#endif
|
44
modules/smtp/register_types.cpp
Normal file
44
modules/smtp/register_types.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
/*************************************************************************/
|
||||
/* register_types.cpp */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE'S SMTP MODULE */
|
||||
/* https://github.com/Relintai/pandemonium_engine */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2022-present Péter Magyar. */
|
||||
/* Copyright (c) 2021-2024 Nicolò Santilio */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "email.h"
|
||||
#include "smtp_client.h"
|
||||
|
||||
void register_smtp_types(ModuleRegistrationLevel p_level) {
|
||||
if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) {
|
||||
ClassDB::register_class<EMail>();
|
||||
ClassDB::register_class<SMTPClient>();
|
||||
}
|
||||
}
|
||||
|
||||
void unregister_smtp_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
39
modules/smtp/register_types.h
Normal file
39
modules/smtp/register_types.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef SMTP_REGISTER_TYPES_H
|
||||
#define SMTP_REGISTER_TYPES_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* register_types.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE'S SMTP MODULE */
|
||||
/* https://github.com/Relintai/pandemonium_engine */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2022-present Péter Magyar. */
|
||||
/* Copyright (c) 2021-2024 Nicolò Santilio */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_smtp_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_smtp_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
43
modules/smtp/smtp_client.cpp
Normal file
43
modules/smtp/smtp_client.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
/*************************************************************************/
|
||||
/* smtp_client.cpp */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE'S SMTP MODULE */
|
||||
/* https://github.com/Relintai/pandemonium_engine */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2022-present Péter Magyar. */
|
||||
/* Copyright (c) 2021-2024 Nicolò Santilio */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "smtp_client.h"
|
||||
|
||||
|
||||
SMTPClient::SMTPClient() {
|
||||
}
|
||||
SMTPClient::~SMTPClient() {
|
||||
}
|
||||
|
||||
void SMTPClient::_bind_methods() {
|
||||
//ClassDB::bind_method(D_METHOD("get_ignored_urls"), &SMTPClient::get_ignored_urls);
|
||||
//ClassDB::bind_method(D_METHOD("set_ignored_urls", "val"), &SMTPClient::set_ignored_urls);
|
||||
//ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "ignored_urls"), "set_ignored_urls", "get_ignored_urls");
|
||||
}
|
47
modules/smtp/smtp_client.h
Normal file
47
modules/smtp/smtp_client.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef SMTP_CLIENT_H
|
||||
#define SMTP_CLIENT_H
|
||||
|
||||
/*************************************************************************/
|
||||
/* smtp_client.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* PANDEMONIUM ENGINE'S SMTP MODULE */
|
||||
/* https://github.com/Relintai/pandemonium_engine */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2022-present Péter Magyar. */
|
||||
/* Copyright (c) 2021-2024 Nicolò Santilio */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class SMTPClient : public Node {
|
||||
GDCLASS(SMTPClient, Node);
|
||||
|
||||
public:
|
||||
SMTPClient();
|
||||
~SMTPClient();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user