libsaria: Remove the library/list subdirectory
I moved all the functions into a single file and bumped that file up one directory. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
8a52471c95
commit
b5339f8688
|
@ -49,6 +49,7 @@ namespace libsaria
|
|||
void list_track(libsaria::Track *);
|
||||
void unlist_track(libsaria::Track *);
|
||||
unsigned int size();
|
||||
void sort_list();
|
||||
void filter(string &text);
|
||||
bool is_visible(sid_t &);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <libsaria/idle.h>
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/libpath.h>
|
||||
#include "list/list.h"
|
||||
#include "library.h"
|
||||
|
||||
static void do_load()
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
#include <libsaria/index.h>
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/print.h>
|
||||
#include "../library.h"
|
||||
#include "list.h"
|
||||
#include "library.h"
|
||||
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
@ -34,4 +33,24 @@ namespace libsaria
|
|||
return lib_playlist.apparent_size();
|
||||
}
|
||||
|
||||
void library::iter::reset()
|
||||
{
|
||||
lib_playlist.iter_reset();
|
||||
}
|
||||
|
||||
libsaria::Track *library::iter::next()
|
||||
{
|
||||
return lib_playlist.iter_next();
|
||||
}
|
||||
|
||||
bool library::iter::end()
|
||||
{
|
||||
return lib_playlist.iter_end();
|
||||
}
|
||||
|
||||
string library::next_file()
|
||||
{
|
||||
libsaria::Track *cur = lib_playlist.next();
|
||||
return cur->get_filepath();
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (c) 2011 Bryan Schumaker.
|
||||
#include <libsaria/track.h>
|
||||
#include <libsaria/library.h>
|
||||
#include "../library.h"
|
||||
#include "list.h"
|
||||
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
static list<libsaria::Track *>::iterator it;
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
namespace library
|
||||
{
|
||||
|
||||
void iter::reset()
|
||||
{
|
||||
lib_playlist.iter_reset();
|
||||
}
|
||||
|
||||
libsaria::Track *iter::next()
|
||||
{
|
||||
return lib_playlist.iter_next();
|
||||
}
|
||||
|
||||
bool iter::end()
|
||||
{
|
||||
return lib_playlist.iter_end();
|
||||
}
|
||||
|
||||
} /* Namespace: library */
|
||||
}; /* Namespace: libsaria */
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef LIBSARIA_LIBRARY_LIST_H
|
||||
#define LIBSARIA_LIBRARY_LIST_H
|
||||
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
namespace library
|
||||
{
|
||||
|
||||
void sort_list();
|
||||
|
||||
}; /* Namespace: library */
|
||||
}; /* Namespace: libsaria */
|
||||
|
||||
#endif /* LIBSARIA_LIBRARY_LIST_H */
|
|
@ -1,35 +0,0 @@
|
|||
// Copyright (c) 2011 Bryan Schumaker.
|
||||
#include <libsaria/library.h>
|
||||
#include <libsaria/index.h>
|
||||
#include <libsaria/track.h>
|
||||
#include <libsaria/prefs.h>
|
||||
#include "../library.h"
|
||||
#include "list.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static string pick_next()
|
||||
{
|
||||
libsaria::Track *cur;
|
||||
cur = lib_playlist.next();
|
||||
return cur->get_filepath();
|
||||
}
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
|
||||
string library::next_file()
|
||||
{
|
||||
string filepath = "";
|
||||
|
||||
if (size() == 0)
|
||||
return filepath;
|
||||
|
||||
do
|
||||
filepath = pick_next();
|
||||
while (filepath == "");
|
||||
|
||||
return filepath;
|
||||
}
|
||||
|
||||
} /* Namespace: libsaria */
|
|
@ -3,7 +3,6 @@
|
|||
#include <libsaria/index.h>
|
||||
#include <libsaria/libpath.h>
|
||||
#include <libsaria/print.h>
|
||||
#include "../list/list.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <list>
|
||||
|
|
Loading…
Reference in New Issue