2021-03-16 11:04:04 +02:00
|
|
|
/* cartographer.h
|
|
|
|
*
|
|
|
|
* Copyright 2021 Joshua Strobl
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <glib-2.0/glib-object.h>
|
|
|
|
#include "../indexer/structs.h"
|
|
|
|
#include "../playlist/playlist.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Type Definition
|
2021-05-11 20:05:04 +03:00
|
|
|
**/
|
2021-03-16 11:04:04 +02:00
|
|
|
|
|
|
|
#define KOTO_TYPE_CARTOGRAPHER koto_cartographer_get_type()
|
2021-05-07 16:45:57 +03:00
|
|
|
|
|
|
|
typedef struct _KotoCartographer KotoCartographer;
|
|
|
|
typedef struct _KotoCartographerClass KotoCartographerClass;
|
|
|
|
|
|
|
|
GLIB_AVAILABLE_IN_ALL
|
|
|
|
GType koto_cartographer_get_type(void) G_GNUC_CONST;
|
2021-03-16 11:04:04 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Cartographer Functions
|
2021-05-11 20:05:04 +03:00
|
|
|
**/
|
|
|
|
|
|
|
|
KotoCartographer * koto_cartographer_new();
|
|
|
|
|
|
|
|
void koto_cartographer_add_album(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoAlbum * album
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_add_artist(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoArtist * artist
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_add_playlist(
|
|
|
|
KotoCartographer * self,
|
|
|
|
KotoPlaylist * playlist
|
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_add_track(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoTrack * track
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_emit_playlist_added(
|
|
|
|
KotoPlaylist * playlist,
|
|
|
|
KotoCartographer * self
|
|
|
|
);
|
|
|
|
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoAlbum * koto_cartographer_get_album_by_uuid(
|
2021-05-11 20:05:04 +03:00
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* album_uuid
|
|
|
|
);
|
|
|
|
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoArtist * koto_cartographer_get_artist_by_uuid(
|
2021-05-11 20:05:04 +03:00
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* artist_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
KotoPlaylist * koto_cartographer_get_playlist_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* playlist_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
GHashTable * koto_cartographer_get_playlists(KotoCartographer * self);
|
|
|
|
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoTrack * koto_cartographer_get_track_by_uuid(
|
2021-05-11 20:05:04 +03:00
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* track_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_album(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoAlbum * album
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_album_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* album_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_artist(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoArtist * artist
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_artist_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* artist_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_playlist(
|
|
|
|
KotoCartographer * self,
|
|
|
|
KotoPlaylist * playlist
|
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_playlist_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* playlist_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_track(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoTrack * track
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
gboolean koto_cartographer_has_track_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* track_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_album(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoAlbum * album
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_album_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* album_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_artist(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoArtist * artist
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_artist_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* artist_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_playlist(
|
|
|
|
KotoCartographer * self,
|
|
|
|
KotoPlaylist * playlist
|
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_playlist_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* playlist_uuid
|
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_track(
|
|
|
|
KotoCartographer * self,
|
2021-05-11 20:08:39 +03:00
|
|
|
KotoTrack * track
|
2021-05-11 20:05:04 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
void koto_cartographer_remove_track_by_uuid(
|
|
|
|
KotoCartographer * self,
|
|
|
|
gchar* track_uuid
|
|
|
|
);
|
2021-03-16 11:04:04 +02:00
|
|
|
|
|
|
|
G_END_DECLS
|