~ubuntu-branches/ubuntu/trusty/mediascanner/trusty-proposed

« back to all changes in this revision

Viewing changes to src/grlmediascanner/mediasource.h

  • Committer: Package Import Robot
  • Author(s): Łukasz 'sil2100' Zemczak
  • Date: 2013-08-13 18:47:34 UTC
  • Revision ID: package-import@ubuntu.com-20130813184734-u3lyvu2u1hgybryc
Tags: upstream-0.3.93
Import upstream version 0.3.93

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the Ubuntu TV Media Scanner
 
3
 * Copyright (C) 2012-2013 Canonical Ltd.
 
4
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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/>.
 
16
 *
 
17
 * Contact: Jim Hodapp <jim.hodapp@canonical.com>
 
18
 * Authored by: Mathias Hasselmann <mathias@openismus.com>
 
19
 */
 
20
#ifndef GRL_MEDIA_SCANNER_SOURCE_H
 
21
#define GRL_MEDIA_SCANNER_SOURCE_H
 
22
 
 
23
// Grilo
 
24
#include <grilo.h>
 
25
 
 
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"
 
31
 
 
32
#define GRL_TYPE_MEDIA_SCANNER_SOURCE \
 
33
    (grl_media_scanner_source_get_type())
 
34
 
 
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))
 
48
 
 
49
G_BEGIN_DECLS
 
50
 
 
51
typedef enum {
 
52
    GRL_MEDIA_SCANNER_SEARCH_SUBSTRING,
 
53
    GRL_MEDIA_SCANNER_SEARCH_FULL_TEXT
 
54
}  GrlMediaScannerSearchMethod;
 
55
 
 
56
typedef struct _GrlMediaScannerSource          GrlMediaScannerSource;
 
57
typedef struct _GrlMediaScannerSourceClass     GrlMediaScannerSourceClass;
 
58
typedef struct _GrlMediaScannerSourcePrivate   GrlMediaScannerSourcePrivate;
 
59
 
 
60
struct _GrlMediaScannerSource {
 
61
    GrlSource parent;
 
62
    GrlMediaScannerSourcePrivate *priv;
 
63
};
 
64
 
 
65
struct _GrlMediaScannerSourceClass {
 
66
    GrlSourceClass parent_class;
 
67
};
 
68
 
 
69
GType grl_media_scanner_source_get_type(void) G_GNUC_CONST;
 
70
 
 
71
GrlMediaScannerSource *grl_media_scanner_source_new(void);
 
72
 
 
73
void grl_media_scanner_source_set_index_path(GrlMediaScannerSource *source,
 
74
                                         const char *path);
 
75
const char *grl_media_scanner_source_get_index_path
 
76
                                            (GrlMediaScannerSource *source);
 
77
 
 
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);
 
82
 
 
83
G_END_DECLS
 
84
 
 
85
#endif // GRL_MEDIA_SCANNER_SOURCE_H