mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T215, remember last server and model as cache value
* also remember last server not VATSIM server * remember last model used * server list selector uses remembered value * login component sets those values
This commit is contained in:
37
src/blackmisc/network/data/lastserver.h
Normal file
37
src/blackmisc/network/data/lastserver.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_NETWORK_DATA_LASTSERVER_H
|
||||
#define BLACKMISC_NETWORK_DATA_LASTSERVER_H
|
||||
|
||||
#include "../server.h"
|
||||
#include "blackmisc/datacache.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Network
|
||||
{
|
||||
namespace Data
|
||||
{
|
||||
//! Trait for last (most recently) used server and user
|
||||
struct TLastServer : public TDataTrait<CServer>
|
||||
{
|
||||
//! Key in data cache
|
||||
static const char *key() { return "lastserver"; }
|
||||
|
||||
//! First load is synchronous
|
||||
static constexpr bool isPinned() { return true; }
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user