File: rhythmdb-query-results.xml

package info (click to toggle)
rhythmbox 0.11.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 26,232 kB
  • ctags: 11,434
  • sloc: ansic: 97,824; xml: 36,080; sh: 9,341; python: 4,193; makefile: 2,130; cpp: 153
file content (153 lines) | stat: -rw-r--r-- 7,540 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="RhythmDBQueryResults">
<refmeta>
<refentrytitle role="top_of_page" id="RhythmDBQueryResults.top_of_page">RhythmDBQueryResults</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>RHYTHMBOX Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>RhythmDBQueryResults</refname>
<refpurpose>interface for receiving query results from RhythmDB</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="RhythmDBQueryResults.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
                    <link linkend="RhythmDBQueryResults-struct">RhythmDBQueryResults</link>;
                    <link linkend="RhythmDBQueryResultsIface">RhythmDBQueryResultsIface</link>;
<link linkend="void">void</link>                <link linkend="rhythmdb-query-results-set-query">rhythmdb_query_results_set_query</link>    (<link linkend="RhythmDBQueryResults">RhythmDBQueryResults</link> *results,
                                                         <link linkend="GPtrArray">GPtrArray</link> *query);
<link linkend="void">void</link>                <link linkend="rhythmdb-query-results-add-results">rhythmdb_query_results_add_results</link>  (<link linkend="RhythmDBQueryResults">RhythmDBQueryResults</link> *results,
                                                         <link linkend="GPtrArray">GPtrArray</link> *entries);
<link linkend="void">void</link>                <link linkend="rhythmdb-query-results-query-complete">rhythmdb_query_results_query_complete</link>
                                                        (<link linkend="RhythmDBQueryResults">RhythmDBQueryResults</link> *results);
</synopsis>
</refsynopsisdiv>

<refsect1 id="RhythmDBQueryResults.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GInterface">GInterface</link>
   +----RhythmDBQueryResults
</synopsis>

</refsect1>




<refsect1 id="RhythmDBQueryResults.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
RhythmDBQueryResults is implemented by
 <link linkend="RhythmDBQueryModel">RhythmDBQueryModel</link>.</para>

</refsect1>




<refsect1 id="RhythmDBQueryResults.description" role="desc">
<title role="desc.title">Description</title>
<para>
This is the interface that <link linkend="RhythmDB"><type>RhythmDB</type></link> uses to report results of database
queries.  When running a query, it first calls rhythmdb_query_results_set_query,
then passes entries matching the query to rhythmdb_query_results_add_results
in batches, and finally calls rhythmdb_query_results_query_complete.
There are no guarantees as to which threads the calls are made from.</para>
<para>

</para>
</refsect1>

<refsect1 id="RhythmDBQueryResults.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="RhythmDBQueryResults-struct" role="struct">
<title>RhythmDBQueryResults</title>
<indexterm zone="RhythmDBQueryResults-struct"><primary>RhythmDBQueryResults</primary></indexterm><programlisting>typedef struct _RhythmDBQueryResults RhythmDBQueryResults;</programlisting>
<para>

</para></refsect2>
<refsect2 id="RhythmDBQueryResultsIface" role="struct">
<title>RhythmDBQueryResultsIface</title>
<indexterm zone="RhythmDBQueryResultsIface"><primary>RhythmDBQueryResultsIface</primary></indexterm><programlisting>typedef struct {
	GTypeInterface g_iface;

	/* vtable */
	void	(*set_query)		(RhythmDBQueryResults *results,
				 	 GPtrArray *query);

	void	(*add_results)		(RhythmDBQueryResults *results,
				 	 GPtrArray *entries);

	void 	(*query_complete)	(RhythmDBQueryResults *results);
} RhythmDBQueryResultsIface;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="rhythmdb-query-results-set-query" role="function">
<title>rhythmdb_query_results_set_query ()</title>
<indexterm zone="rhythmdb-query-results-set-query"><primary>rhythmdb_query_results_set_query</primary></indexterm><programlisting><link linkend="void">void</link>                rhythmdb_query_results_set_query    (<link linkend="RhythmDBQueryResults">RhythmDBQueryResults</link> *results,
                                                         <link linkend="GPtrArray">GPtrArray</link> *query);</programlisting>
<para>
When a new query is run, this method is invoked to give the
object implementing this interface a chance to take a copy of the
query criteria, so that it can evaluate the query for newly added
or changed entries once the query is complete.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="RhythmDBQueryResults"><type>RhythmDBQueryResults</type></link> implementation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>query</parameter>&nbsp;:</term>
<listitem><simpara> the new query
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rhythmdb-query-results-add-results" role="function">
<title>rhythmdb_query_results_add_results ()</title>
<indexterm zone="rhythmdb-query-results-add-results"><primary>rhythmdb_query_results_add_results</primary></indexterm><programlisting><link linkend="void">void</link>                rhythmdb_query_results_add_results  (<link linkend="RhythmDBQueryResults">RhythmDBQueryResults</link> *results,
                                                         <link linkend="GPtrArray">GPtrArray</link> *entries);</programlisting>
<para>
Provides a new set of query results.  References must be taken on the
entries.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="RhythmDBQueryResults"><type>RhythmDBQueryResults</type></link> implementation
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entries</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="GPtrArray"><type>GPtrArray</type></link> containing <link linkend="RhythmDBEntry"><type>RhythmDBEntry</type></link> results
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="rhythmdb-query-results-query-complete" role="function">
<title>rhythmdb_query_results_query_complete ()</title>
<indexterm zone="rhythmdb-query-results-query-complete"><primary>rhythmdb_query_results_query_complete</primary></indexterm><programlisting><link linkend="void">void</link>                rhythmdb_query_results_query_complete
                                                        (<link linkend="RhythmDBQueryResults">RhythmDBQueryResults</link> *results);</programlisting>
<para>
Called when the query is complete and all entries that match the query
have been supplied to rhythmdb_query_results_add_results.  If the object
implementing this interface needs to identify newly added or changed entries
that match the query, it needs to use the entry-added, entry-deleted and
entry-changed signals from <link linkend="RhythmDB"><type>RhythmDB</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>results</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="RhythmDBQueryResults"><type>RhythmDBQueryResults</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>