0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 17:08:20 +02:00

modules/app: Reorganize units into a single shared object strategy.

This commit is contained in:
Jason Volk 2019-03-15 13:20:05 -07:00
parent ede2439a55
commit ccc986a073
4 changed files with 66 additions and 11 deletions

View file

@ -468,12 +468,13 @@ media_module_LTLIBRARIES = \
app_moduledir = @moduledir@
app_app_register_la_SOURCES = \
app/register.cc \
app_app_app_la_SOURCES = \
app/app.cc \
app/transactions.cc \
###
app_module_LTLIBRARIES = \
app/app_register.la \
app/app_app.la \
###
###############################################################################

41
modules/app/app.cc Normal file
View file

@ -0,0 +1,41 @@
// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2019 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
#include "app.h"
ircd::mapi::header
IRCD_MODULE
{
"Application Services",
ircd::m::app::init,
ircd::m::app::fini
};
decltype(ircd::m::app::app_room_id)
ircd::m::app::app_room_id
{
"app", my_host()
};
decltype(ircd::m::app::apps)
ircd::m::app::apps;
void
ircd::m::app::init()
{
if(!m::exists(app_room_id))
m::create(app_room_id, m::me, "internal");
}
void
ircd::m::app::fini()
{
}

19
modules/app/app.h Normal file
View file

@ -0,0 +1,19 @@
// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2019 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
// app.cc
namespace ircd::m::app
{
void init();
void fini();
extern const m::room::id::buf app_room_id;
extern std::map<std::string, m::room::id::buf> apps;
}

View file

@ -1,17 +1,11 @@
// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
// Copyright (C) 2016-2019 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
using namespace ircd;
mapi::header
IRCD_MODULE
{
"2.1 :Application Services :Registration",
};
#include "app.h"