1 |
douglas |
542 |
// Library |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _Library_hpp_ |
8 |
|
|
#define _Library_hpp_ |
9 |
|
|
|
10 |
douglas |
553 |
#include <menes/c++/platform.hpp> |
11 |
douglas |
542 |
|
12 |
|
|
#ifndef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
douglas |
552 |
#include "By.hpp" |
17 |
douglas |
542 |
#include "MediaFolder.hpp" |
18 |
|
|
|
19 |
|
|
class Library |
20 |
|
|
{ |
21 |
|
|
private: |
22 |
|
|
mutable _R<dbi::Connection> connection; |
23 |
|
|
public: |
24 |
|
|
Library(const _R<dbi::Connection>& connection); |
25 |
|
|
_L<MediaFolder> GetFolders() const; |
26 |
douglas |
549 |
_finline MediaFolder GetFolder(const api::Path& path) const { return MediaFolder(connection, path); } |
27 |
douglas |
552 |
_L<MediaFile> GetFiles(const _L<By>& bys, const _L<cse::String>& items) const; |
28 |
douglas |
549 |
_finline MediaFile GetFile(const api::Path& path) const { return MediaFile(connection, path); } |
29 |
douglas |
552 |
_L<cse::String> GetItems(_L<By> bys, _L<cse::String> items) const; |
30 |
douglas |
542 |
}; |
31 |
|
|
|
32 |
|
|
#endif//_Library_hpp_ |