Added LocalLibraryConstants.h

This commit is contained in:
casey 2016-05-16 18:38:03 -07:00
parent 60cdbdded8
commit 1c13ac278d
4 changed files with 247 additions and 81 deletions

View File

@ -126,6 +126,7 @@
<ClInclude Include="library\IQuery.h" />
<ClInclude Include="library\LocalLibrary.h" />
<ClInclude Include="library\LibraryFactory.h" />
<ClInclude Include="library\LocalLibraryConstants.h" />
<ClInclude Include="library\metadata\MetadataValue.h" />
<ClInclude Include="Library\query\QueryBase.h" />
<ClInclude Include="library\track\InMemoryTrack.h" />

View File

@ -264,5 +264,8 @@
<ClInclude Include="library\IQuery.h">
<Filter>src\library</Filter>
</ClInclude>
<ClInclude Include="library\LocalLibraryConstants.h">
<Filter>src\library</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,156 @@
//////////////////////////////////////////////////////////////////////////////
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
namespace musik { namespace core { namespace library { namespace constants {
namespace Track {
static const char* TABLE_NAME = "tracks";
static const char* ID = "id";
static const char* TRACK_NUM = "track";
static const char* BPM = "bpm";
static const char* DURATION = "duration";
static const char* FILESIZE = "filesize";
static const char* YEAR = "year";
static const char* DISPLAY_GENRE_ID = "visual_genre_id";
static const char* DISPLAY_ARTIST_ID = "visual_artist_id";
static const char* ALBUM_ID = "album_id";
static const char* RELATIVE_PATH_ID = "folder_id";
static const char* TITLE = "title";
static const char* FILENAME = "filename";
static const char* FILETIME = "filetime";
static const char* THUMBNAIL_ID = "thumbnail_id";
static const char* SORT_ORDER = "sort_order1";
static const char* PATH = "path"; /* not in DB; synthesized */
}
namespace Genres {
static const char* TABLE_NAME = "genres";
static const char* ID = "id";
static const char* NAME = "name";
static const char* AGGREGATED = "aggregated";
static const char* SORT_ORDER = "sort_order";
}
namespace TrackGenres {
static const char* TABLE_NAME = "track_genres";
static const char* ID = "id";
static const char* TRACK_ID = "track_id";
static const char* GENRE_ID = "genre_id";
}
namespace Artists {
static const char* TABLE_NAME = "artists";
static const char* ID = "id";
static const char* NAME = "name";
static const char* AGGREGATED = "aggregated";
static const char* SORT_ORDER = "sort_order";
}
namespace ArtistGenres {
static const char* TABLE_NAME = "artist_genres";
static const char* ID = "id";
static const char* TRACK_ID = "track_id";
static const char* GENRE_ID = "artist_id";
}
namespace Albums {
static const char* TABLE_NAME = "albums";
static const char* ID = "id";
static const char* NAME = "name";
static const char* THUMBNAIL_ID = "thumbnail_id";
static const char* SORT_ORDER = "sort_order";
}
namespace NormalizedKeys {
static const char* TABLE_NAME = "meta_keys";
static const char* ID = "id";
static const char* NAME = "name";
}
namespace NormalizedValues {
static const char* TABLE_NAME = "meta_values";
static const char* ID = "id";
static const char* KEY_ID = "meta_key_id";
static const char* SORT_ORDER = "sort_order";
static const char* CONTENT = "content";
}
namespace ExtendedTrackMetadata {
static const char* TABLE_NAME = "track_meta";
static const char* ID = "id";
static const char* TRACK_ID = "track_id";
static const char* VALUE_ID = "meta_value_id";
}
namespace Paths {
static const char* TABLE_NAME = "paths";
static const char* ID = "id";
static const char* PATH = "path";
}
namespace RelativePaths {
static const char* TABLE_NAME = "folders";
static const char* ID = "id";
static const char* NAME = "name";
static const char* RELATIVE_PATH = "relative_path";
static const char* PARENT_ID = "parent_id";
static const char* PATH_ID = "path_id";
}
namespace Thumbnails {
static const char* TABLE_NAME = "thumbnails";
static const char* ID = "id";
static const char* FILENAME = "filename";
static const char* FILESIZE = "filesize";
static const char* CHECKSUM = "checksum";
}
namespace Playlists {
static const char* TABLE_NAME = "playlists";
static const char* ID = "id";
static const char* NAME = "name";
}
namespace PlaylistTracks {
static const char* TABLE_NAME = "playlist_tracks";
static const char* TRACK_ID = "track_id";
static const char* PLAYLIST_ID = "playlist_id";
static const char* SORT_ORDER = "sort_order";
}
} } } }

View File

@ -3,71 +3,41 @@
<ItemGroup>
<ClCompile Include="Main.cpp" />
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="Colors.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="IScrollAdapter.h">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="CommandWindow.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="LogWindow.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="OutputWindow.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="ResourcesWindow.cpp">
<Filter>view</Filter>
</ClCompile>
<ClCompile Include="Screen.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="SimpleScrollAdapter.cpp">
<Filter>curses</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="SystemInfo.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="TransportWindow.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="IInput.h">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="Window.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="MainLayout.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="LibraryLayout.cpp">
<Filter>view</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="CategoryListView.cpp">
<Filter>view</Filter>
</ClCompile>
<ClCompile Include="SingleLineEntry.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="MultiLineEntry.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="ScrollAdapterBase.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="ScrollableWindow.cpp">
<Filter>curses</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="TrackListView.cpp">
<Filter>view</Filter>
</ClCompile>
<ClCompile Include="ListWindow.cpp">
<Filter>curses</Filter>
</ClCompile>
<ClCompile Include="LayoutBase.cpp">
<Filter>curses</Filter>
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="WindowMessage.cpp">
<Filter>curses</Filter>
@ -81,38 +51,59 @@
<ClCompile Include="CategoryListViewQuery.cpp">
<Filter>query</Filter>
</ClCompile>
<ClCompile Include="Colors.cpp">
<Filter>curses\util</Filter>
</ClCompile>
<ClCompile Include="Screen.cpp">
<Filter>curses\util</Filter>
</ClCompile>
<ClCompile Include="LayoutBase.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="ListWindow.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="MultiLineEntry.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="ScrollableWindow.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="ScrollAdapterBase.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="SimpleScrollAdapter.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="SingleLineEntry.cpp">
<Filter>curses\window</Filter>
</ClCompile>
<ClCompile Include="Window.cpp">
<Filter>curses\window</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="Colors.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="curses_config.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="CommandWindow.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="LogWindow.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="OutputWindow.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="ResourcesWindow.h">
<Filter>view</Filter>
</ClInclude>
<ClInclude Include="Screen.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="SimpleScrollAdapter.h">
<Filter>curses</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="SystemInfo.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="TransportWindow.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="ILayout.h">
<Filter>curses</Filter>
@ -120,41 +111,20 @@
<ClInclude Include="IWindow.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="Window.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="MainLayout.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="IScrollable.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="LibraryLayout.h">
<Filter>view</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="CategoryListView.h">
<Filter>view</Filter>
</ClInclude>
<ClInclude Include="SingleLineEntry.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="MultiLineEntry.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="ScrollAdapterBase.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="ScrollableWindow.h">
<Filter>curses</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="TrackListView.h">
<Filter>view</Filter>
</ClInclude>
<ClInclude Include="ListWindow.h">
<Filter>curses</Filter>
</ClInclude>
<ClInclude Include="LayoutBase.h">
<Filter>curses</Filter>
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="IWindowGroup.h">
<Filter>curses</Filter>
@ -177,6 +147,36 @@
<ClInclude Include="CategoryListViewQuery.h">
<Filter>query</Filter>
</ClInclude>
<ClInclude Include="Colors.h">
<Filter>curses\util</Filter>
</ClInclude>
<ClInclude Include="Screen.h">
<Filter>curses\util</Filter>
</ClInclude>
<ClInclude Include="LayoutBase.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="ListWindow.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="MultiLineEntry.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="ScrollableWindow.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="ScrollAdapterBase.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="SimpleScrollAdapter.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="SingleLineEntry.h">
<Filter>curses\window</Filter>
</ClInclude>
<ClInclude Include="Window.h">
<Filter>curses\window</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="curses">
@ -185,8 +185,14 @@
<Filter Include="query">
<UniqueIdentifier>{8de1fc82-96fd-4871-a6b0-fed0d6b21aa1}</UniqueIdentifier>
</Filter>
<Filter Include="view">
<Filter Include="curses\util">
<UniqueIdentifier>{c7d44e46-7435-49a2-a8fb-f304ad069a96}</UniqueIdentifier>
</Filter>
<Filter Include="window">
<UniqueIdentifier>{c1ada983-8f4e-4ac4-86be-fa6fdffec375}</UniqueIdentifier>
</Filter>
<Filter Include="curses\window">
<UniqueIdentifier>{e225eaf8-808a-4550-96b6-d86e748bedab}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>