swift
authenticateduser.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_CORE_DATA_AUTHENTICATEDUSER_H
7 #define SWIFT_CORE_DATA_AUTHENTICATEDUSER_H
8 
9 #include "misc/datacache.h"
11 
13 {
16  struct TAuthenticatedDbUser : public swift::misc::TDataTrait<swift::misc::network::CAuthenticatedUser>
17  {
19  static const char *key() { return "dbuser"; }
20 
22  static constexpr bool isPinned() { return true; }
23 
25  static constexpr bool isSession() { return true; }
26 
28  static int timeToLive() { return 18 * 60 * 60 * 1000; }
29  };
30 } // namespace swift::core::data
31 
32 #endif // SWIFT_CORE_DATA_AUTHENTICATEDUSER_H
Core data traits (aka cached values) and classes.
Trait for for global cached DB user. This user has authenticated with the swift DB.
static constexpr bool isPinned()
First load is synchronous.
static const char * key()
Key in data cache.
static int timeToLive()
Cache lifetime.
static constexpr bool isSession()
Session object.
Base class for traits to be used as template argument to swift::misc::CData.
Definition: datacache.h:459