2
* This file is part of the Ubuntu TV Media Scanner
3
* Copyright (C) 2012-2013 Canonical Ltd.
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Lesser General Public License version 3 as
7
* published by the Free Software Foundation.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Contact: Jim Hodapp <jim.hodapp@canonical.com>
18
* Authored by: Mathias Hasselmann <mathias@openismus.com>
20
#ifndef GRL_MEDIA_SCANNER_SOURCE_H
21
#define GRL_MEDIA_SCANNER_SOURCE_H
26
#define GRL_MEDIA_SCANNER_PLUGIN_ID "grl-mediascanner"
27
#define GRL_MEDIA_SCANNER_CONFIG_INDEX_PATH "index-path"
28
#define GRL_MEDIA_SCANNER_CONFIG_SEARCH_METHOD "search-method"
29
#define GRL_MEDIA_SCANNER_CONFIG_SEARCH_SUBSTRING "substring"
30
#define GRL_MEDIA_SCANNER_CONFIG_SEARCH_FULL_TEXT "fulltext"
32
#define GRL_TYPE_MEDIA_SCANNER_SOURCE \
33
(grl_media_scanner_source_get_type())
35
#define GRL_MEDIA_SCANNER_SOURCE(obj) \
36
(G_TYPE_CHECK_INSTANCE_CAST((obj), GRL_TYPE_MEDIA_SCANNER_SOURCE, \
37
GrlMediaScannerSource))
38
#define GRL_IS_MEDIA_SCANNER_SOURCE(obj) \
39
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GRL_TYPE_MEDIA_SCANNER_SOURCE))
40
#define GRL_MEDIA_SCANNER_SOURCE_CLASS(cls) \
41
(G_TYPE_CHECK_CLASS_CAST((cls), GRL_TYPE_MEDIA_SCANNER_SOURCE, \
42
GrlMediaScannerSourceClass))
43
#define GRL_IS_MEDIA_SCANNER_SOURCE_CLASS(cls) \
44
(G_TYPE_CHECK_CLASS_TYPE((cls), GRL_TYPE_MEDIA_SCANNER_SOURCE))
45
#define GRL_MEDIA_SCANNER_SOURCE_GET_CLASS(obj) \
46
(G_TYPE_INSTANCE_GET_CLASS((obj), GRL_TYPE_MEDIA_SCANNER_SOURCE, \
47
GrlMediaScannerSourceClass))
52
GRL_MEDIA_SCANNER_SEARCH_SUBSTRING,
53
GRL_MEDIA_SCANNER_SEARCH_FULL_TEXT
54
} GrlMediaScannerSearchMethod;
56
typedef struct _GrlMediaScannerSource GrlMediaScannerSource;
57
typedef struct _GrlMediaScannerSourceClass GrlMediaScannerSourceClass;
58
typedef struct _GrlMediaScannerSourcePrivate GrlMediaScannerSourcePrivate;
60
struct _GrlMediaScannerSource {
62
GrlMediaScannerSourcePrivate *priv;
65
struct _GrlMediaScannerSourceClass {
66
GrlSourceClass parent_class;
69
GType grl_media_scanner_source_get_type(void) G_GNUC_CONST;
71
GrlMediaScannerSource *grl_media_scanner_source_new(void);
73
void grl_media_scanner_source_set_index_path(GrlMediaScannerSource *source,
75
const char *grl_media_scanner_source_get_index_path
76
(GrlMediaScannerSource *source);
78
void grl_media_scanner_source_set_search_method(GrlMediaScannerSource *source,
79
GrlMediaScannerSearchMethod method);
80
GrlMediaScannerSearchMethod grl_media_scanner_source_get_search_method
81
(GrlMediaScannerSource *source);
85
#endif // GRL_MEDIA_SCANNER_SOURCE_H