db/upnp/Object: smaller enums

This commit is contained in:
Max Kellermann 2024-01-04 14:31:21 +01:00
parent b2ed29b8c0
commit c8e2ab6781
1 changed files with 4 additions and 6 deletions

View File

@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project // Copyright The Music Player Daemon Project
#ifndef MPD_UPNP_OBJECT_HXX #pragma once
#define MPD_UPNP_OBJECT_HXX
#include "tag/Tag.hxx" #include "tag/Tag.hxx"
#include <cstdint>
#include <string> #include <string>
/** /**
@ -15,7 +15,7 @@
*/ */
class UPnPDirObject { class UPnPDirObject {
public: public:
enum class Type { enum class Type : uint_least8_t {
UNKNOWN, UNKNOWN,
ITEM, ITEM,
CONTAINER, CONTAINER,
@ -28,7 +28,7 @@ public:
// items are special to us, and so should playlists, but I've not // items are special to us, and so should playlists, but I've not
// seen one of the latter yet (servers seem to use containers for // seen one of the latter yet (servers seem to use containers for
// playlists). // playlists).
enum class ItemClass { enum class ItemClass : uint_least8_t {
UNKNOWN, UNKNOWN,
MUSIC, MUSIC,
PLAYLIST, PLAYLIST,
@ -88,5 +88,3 @@ public:
item_class != UPnPDirObject::ItemClass::UNKNOWN); item_class != UPnPDirObject::ItemClass::UNKNOWN);
} }
}; };
#endif /* _UPNPDIRCONTENT_H_X_INCLUDED_ */