mirror of
https://github.com/RetroShare/libretroshare.git
synced 2026-09-14 11:05:45 +05:00
Fix to use RsServiceType::CALENDAR
This commit is contained in:
parent
4da411a5f0
commit
2df86a697f
@ -26,7 +26,7 @@
|
||||
|
||||
RsItem *RsGxsCalendarSerialiser::create_item(uint16_t service_id, uint8_t item_subtype) const
|
||||
{
|
||||
if(service_id != RS_SERVICE_GXS_TYPE_CALENDAR)
|
||||
if(service_id != static_cast<uint16_t>(RsServiceType::CALENDAR))
|
||||
return nullptr;
|
||||
|
||||
switch(item_subtype)
|
||||
|
||||
@ -34,7 +34,7 @@ const uint8_t RS_PKT_SUBTYPE_GXSCALENDAR_MSG_ITEM = 0x02;
|
||||
class RsGxsCalendarGroupItem : public RsGxsGrpItem
|
||||
{
|
||||
public:
|
||||
RsGxsCalendarGroupItem(): RsGxsGrpItem(RS_SERVICE_GXS_TYPE_CALENDAR, RS_PKT_SUBTYPE_GXSCALENDAR_GROUP_ITEM) {}
|
||||
RsGxsCalendarGroupItem(): RsGxsGrpItem(static_cast<uint16_t>(RsServiceType::CALENDAR), RS_PKT_SUBTYPE_GXSCALENDAR_GROUP_ITEM) {}
|
||||
virtual ~RsGxsCalendarGroupItem() override = default;
|
||||
|
||||
void clear();
|
||||
@ -50,7 +50,7 @@ public:
|
||||
class RsGxsCalendarMessageItem : public RsGxsMsgItem
|
||||
{
|
||||
public:
|
||||
RsGxsCalendarMessageItem(): RsGxsMsgItem(RS_SERVICE_GXS_TYPE_CALENDAR, RS_PKT_SUBTYPE_GXSCALENDAR_MSG_ITEM) {}
|
||||
RsGxsCalendarMessageItem(): RsGxsMsgItem(static_cast<uint16_t>(RsServiceType::CALENDAR), RS_PKT_SUBTYPE_GXSCALENDAR_MSG_ITEM) {}
|
||||
virtual ~RsGxsCalendarMessageItem() override = default;
|
||||
|
||||
void clear();
|
||||
@ -66,7 +66,7 @@ public:
|
||||
class RsGxsCalendarSerialiser : public RsGxsCommentSerialiser
|
||||
{
|
||||
public:
|
||||
RsGxsCalendarSerialiser() : RsGxsCommentSerialiser(RS_SERVICE_GXS_TYPE_CALENDAR) {}
|
||||
RsGxsCalendarSerialiser() : RsGxsCommentSerialiser(static_cast<uint16_t>(RsServiceType::CALENDAR)) {}
|
||||
virtual ~RsGxsCalendarSerialiser() override = default;
|
||||
|
||||
virtual RsItem *create_item(uint16_t service_id, uint8_t item_subtype) const override;
|
||||
|
||||
@ -137,9 +137,6 @@ RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_GXSCIRCLE
|
||||
/// not gxs, but used with identities.
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_REPUTATION = 0x0219;
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220;
|
||||
#ifdef RS_USE_CALENDAR
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CALENDAR = 0x0221;
|
||||
#endif
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230;
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_JSONAPI = 0x0240;
|
||||
/// used to save notification records in GXS and possible other service-based configuration
|
||||
@ -148,9 +145,6 @@ RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_POSTED_CONFI
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG = 0x0317;
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CIRCLES_CONFIG = 0x0318;
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_WIRE_CONFIG = 0x0319;
|
||||
#ifdef RS_USE_CALENDAR
|
||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CALENDAR_CONFIG = 0x0321;
|
||||
#endif
|
||||
|
||||
// Experimental Services.
|
||||
/* DSDV Testing at the moment - Service Only */
|
||||
|
||||
@ -1497,12 +1497,12 @@ int RsServer::StartupRetroShare()
|
||||
/**** Calendar GXS service ****/
|
||||
|
||||
RsGeneralDataService* calendar_ds = new RsDataService(currGxsDir + "/", "calendar_db",
|
||||
RS_SERVICE_GXS_TYPE_CALENDAR, NULL, rsInitConfig->gxs_passwd);
|
||||
static_cast<uint16_t>(RsServiceType::CALENDAR), NULL, rsInitConfig->gxs_passwd);
|
||||
|
||||
p3GxsCalendar *mGxsCalendar = new p3GxsCalendar(calendar_ds, NULL, mGxsIdService);
|
||||
|
||||
RsGxsNetService* calendar_ns = new RsGxsNetService(
|
||||
RS_SERVICE_GXS_TYPE_CALENDAR, calendar_ds, nxsMgr,
|
||||
static_cast<uint16_t>(RsServiceType::CALENDAR), calendar_ds, nxsMgr,
|
||||
mGxsCalendar, mGxsCalendar->getServiceInfo(),
|
||||
mReputations, mGxsCircles, mGxsIdService,
|
||||
pgpAuxUtils, mGxsNetTunnel,
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
RsGxsCalendar* rsGxsCalendar = nullptr;
|
||||
|
||||
p3GxsCalendar::p3GxsCalendar(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs) :
|
||||
RsGenExchange(gds, nes, new RsGxsCalendarSerialiser(), RS_SERVICE_GXS_TYPE_CALENDAR, gixs, calendarAuthenPolicy()),
|
||||
RsGenExchange(gds, nes, new RsGxsCalendarSerialiser(), static_cast<uint16_t>(RsServiceType::CALENDAR), gixs, calendarAuthenPolicy()),
|
||||
RsGxsCalendar(static_cast<RsGxsIface&>(*this)), GxsTokenQueue(this)
|
||||
{
|
||||
}
|
||||
@ -50,7 +50,7 @@ uint32_t p3GxsCalendar::calendarAuthenPolicy()
|
||||
|
||||
RsServiceInfo p3GxsCalendar::getServiceInfo()
|
||||
{
|
||||
return RsServiceInfo(RS_SERVICE_GXS_TYPE_CALENDAR,
|
||||
return RsServiceInfo(static_cast<uint16_t>(RsServiceType::CALENDAR),
|
||||
"gxscalendar",
|
||||
1, 0, // major, minor version
|
||||
1, 0); // min major, minor version
|
||||
|
||||
Loading…
Reference in New Issue
Block a user