Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
e9e5d6b8
Commit
e9e5d6b8
authored
Apr 23, 2018
by
Hugo Beauzée-Luyssen
Browse files
Add a pagination API
parent
3931dc44
Changes
2
Show whitespace changes
Inline
Side-by-side
Makefile.am
View file @
e9e5d6b8
...
...
@@ -37,6 +37,7 @@ libmedialibrary_la_HEADERS = \
include/medialibrary/Types.h
\
include/medialibrary/IDeviceLister.h
\
include/medialibrary/IFolder.h
\
include/medialibrary/IQuery.h
\
$(NULL)
libmedialibrary_la_SOURCES
=
\
...
...
include/medialibrary/IQuery.h
0 → 100644
View file @
e9e5d6b8
/*****************************************************************************
* Media Library
*****************************************************************************
* Copyright (C) 2015 Hugo Beauzée-Luyssen, Videolabs
*
* Authors: Hugo Beauzée-Luyssen<hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#pragma once
#include <vector>
#include <memory>
namespace
medialibrary
{
template
<
typename
T
>
class
IQuery
{
public:
using
Result
=
std
::
vector
<
std
::
shared_ptr
<
T
>>
;
virtual
~
IQuery
()
=
default
;
virtual
size_t
count
()
=
0
;
virtual
Result
items
(
uint32_t
nbItems
,
uint32_t
offset
)
=
0
;
virtual
Result
all
()
=
0
;
};
template
<
typename
T
>
using
Query
=
std
::
unique_ptr
<
IQuery
<
T
>>
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment