mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +01:00
modules/client/sync: Stub device related sync modules.
This commit is contained in:
parent
5c19cfa3de
commit
8fd1b57e86
4 changed files with 165 additions and 0 deletions
|
@ -289,11 +289,17 @@ client_module_LTLIBRARIES += \
|
||||||
client_client_sync_account_data_la_SOURCES = client/sync/account_data.cc
|
client_client_sync_account_data_la_SOURCES = client/sync/account_data.cc
|
||||||
client_client_sync_presence_la_SOURCES = client/sync/presence.cc
|
client_client_sync_presence_la_SOURCES = client/sync/presence.cc
|
||||||
client_client_sync_rooms_la_SOURCES = client/sync/rooms.cc
|
client_client_sync_rooms_la_SOURCES = client/sync/rooms.cc
|
||||||
|
client_client_sync_to_device_la_SOURCES = client/sync/to_device.cc
|
||||||
|
client_client_sync_device_lists_la_SOURCES = client/sync/device_lists.cc
|
||||||
|
client_client_sync_device_one_time_keys_count_la_SOURCES = client/sync/device_one_time_keys_count.cc
|
||||||
|
|
||||||
client_module_LTLIBRARIES += \
|
client_module_LTLIBRARIES += \
|
||||||
client/client_sync_account_data.la \
|
client/client_sync_account_data.la \
|
||||||
client/client_sync_presence.la \
|
client/client_sync_presence.la \
|
||||||
client/client_sync_rooms.la \
|
client/client_sync_rooms.la \
|
||||||
|
client/client_sync_to_device.la \
|
||||||
|
client/client_sync_device_lists.la \
|
||||||
|
client/client_sync_device_one_time_keys_count.la \
|
||||||
###
|
###
|
||||||
|
|
||||||
# client/sync/rooms/
|
# client/sync/rooms/
|
||||||
|
|
56
modules/client/sync/device_lists.cc
Normal file
56
modules/client/sync/device_lists.cc
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
// Matrix Construct
|
||||||
|
//
|
||||||
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||||
|
// Copyright (C) 2016-2018 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.
|
||||||
|
|
||||||
|
ircd::mapi::header
|
||||||
|
IRCD_MODULE
|
||||||
|
{
|
||||||
|
"Client Sync :Device Lists"
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace ircd::m::sync
|
||||||
|
{
|
||||||
|
static void device_lists_polylog(data &);
|
||||||
|
static void device_lists_linear(data &);
|
||||||
|
|
||||||
|
extern item device_lists;
|
||||||
|
}
|
||||||
|
|
||||||
|
decltype(ircd::m::sync::device_lists)
|
||||||
|
ircd::m::sync::device_lists
|
||||||
|
{
|
||||||
|
"device_lists",
|
||||||
|
device_lists_polylog,
|
||||||
|
device_lists_linear
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::m::sync::device_lists_linear(data &data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::m::sync::device_lists_polylog(data &data)
|
||||||
|
{
|
||||||
|
json::stack::object object
|
||||||
|
{
|
||||||
|
data.out
|
||||||
|
};
|
||||||
|
|
||||||
|
json::stack::array
|
||||||
|
{
|
||||||
|
data.out, "changed"
|
||||||
|
};
|
||||||
|
|
||||||
|
json::stack::array
|
||||||
|
{
|
||||||
|
data.out, "left"
|
||||||
|
};
|
||||||
|
}
|
47
modules/client/sync/device_one_time_keys_count.cc
Normal file
47
modules/client/sync/device_one_time_keys_count.cc
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
// Matrix Construct
|
||||||
|
//
|
||||||
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||||
|
// Copyright (C) 2016-2018 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.
|
||||||
|
|
||||||
|
ircd::mapi::header
|
||||||
|
IRCD_MODULE
|
||||||
|
{
|
||||||
|
"Client Sync :Device One Time Keys Count"
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace ircd::m::sync
|
||||||
|
{
|
||||||
|
static void device_one_time_keys_count_polylog(data &);
|
||||||
|
static void device_one_time_keys_count_linear(data &);
|
||||||
|
|
||||||
|
extern item device_one_time_keys_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
decltype(ircd::m::sync::device_one_time_keys_count)
|
||||||
|
ircd::m::sync::device_one_time_keys_count
|
||||||
|
{
|
||||||
|
"device_one_time_keys_count",
|
||||||
|
device_one_time_keys_count_polylog,
|
||||||
|
device_one_time_keys_count_linear
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::m::sync::device_one_time_keys_count_linear(data &data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::m::sync::device_one_time_keys_count_polylog(data &data)
|
||||||
|
{
|
||||||
|
json::stack::object object
|
||||||
|
{
|
||||||
|
data.out
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
56
modules/client/sync/to_device.cc
Normal file
56
modules/client/sync/to_device.cc
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
// Matrix Construct
|
||||||
|
//
|
||||||
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||||
|
// Copyright (C) 2016-2018 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.
|
||||||
|
|
||||||
|
ircd::mapi::header
|
||||||
|
IRCD_MODULE
|
||||||
|
{
|
||||||
|
"Client Sync :To Device"
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace ircd::m::sync
|
||||||
|
{
|
||||||
|
static void to_device_polylog(data &);
|
||||||
|
static void to_device_linear(data &);
|
||||||
|
|
||||||
|
extern item to_device;
|
||||||
|
}
|
||||||
|
|
||||||
|
decltype(ircd::m::sync::to_device)
|
||||||
|
ircd::m::sync::to_device
|
||||||
|
{
|
||||||
|
"to_device",
|
||||||
|
to_device_polylog,
|
||||||
|
to_device_linear
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::m::sync::to_device_linear(data &data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::m::sync::to_device_polylog(data &data)
|
||||||
|
{
|
||||||
|
json::stack::object object
|
||||||
|
{
|
||||||
|
data.out
|
||||||
|
};
|
||||||
|
|
||||||
|
json::stack::array array
|
||||||
|
{
|
||||||
|
data.out, "events"
|
||||||
|
};
|
||||||
|
|
||||||
|
const m::room::state &state
|
||||||
|
{
|
||||||
|
data.user_state
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue