~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/fl_sources/google_source.h

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * @file google_source.h Google Reader feed list source support
3
3
 * 
4
 
 * Copyright (C) 2007 Lars Lindner <lars.lindner@gmail.com>
 
4
 * Copyright (C) 2007-2011 Lars Lindner <lars.lindner@gmail.com>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
45
45
        GTimeVal        lastQuickUpdate;
46
46
} *GoogleSourcePtr;
47
47
 
48
 
 
49
 
enum { 
 
48
 enum { 
50
49
        GOOGLE_SOURCE_STATE_NONE = 0,
51
50
        GOOGLE_SOURCE_STATE_IN_PROGRESS,
52
51
        GOOGLE_SOURCE_STATE_ACTIVE
177
176
 */
178
177
#define GOOGLE_READER_EDIT_TAG_ADD_TAG_FOR_LINK "i=%s&s=user%2F-%2Fsource%2Fcom.google%2Flink&a=%s&r=%s&ac=edit-tags&T=%s&async=true"
179
178
 
180
 
 
181
 
 
182
179
/** A set of tags (states) defined by Google reader */
183
180
 
184
181
#define GOOGLE_READER_TAG_KEPT_UNREAD          "user/-/state/com.google/kept-unread"
186
183
#define GOOGLE_READER_TAG_TRACKING_KEPT_UNREAD "user/-/state/com.google/tracking-kept-unread"
187
184
#define GOOGLE_READER_TAG_STARRED              "user/-/state/com.google/starred"
188
185
 
189
 
 
190
 
/**
191
 
 * Interval (in seconds) for doing a Quick Update. 
192
 
 */
193
 
#define GOOGLE_SOURCE_QUICK_UPDATE_INTERVAL 600  /* 10 minutes */
194
 
 
195
 
/**
196
 
 * Returns Google Reader source type implementation info.
 
186
/** Interval (in seconds) for doing a Quick Update: 10min */
 
187
#define GOOGLE_SOURCE_QUICK_UPDATE_INTERVAL 600
 
188
 
 
189
/**
 
190
 * @returns Google Reader source type implementation info.
197
191
 */
198
192
nodeSourceTypePtr google_source_get_type (void);
199
193
 
201
195
extern struct subscriptionType googleSourceOpmlSubscriptionType;
202
196
 
203
197
/**
204
 
 * Set the flagged state on an item.
205
 
 *
206
 
 * @param node The node which contains the item
207
 
 * @param item The item to whose status needs to be changed
208
 
 * @param newStatus TRUE to mark the item as read, FALSE to mark as unread
209
 
 */
210
 
void 
211
 
google_source_item_set_flag (nodePtr node, itemPtr item, gboolean newStatus);
212
 
 
213
 
/**
214
 
 * Mark an item as read.
215
 
 *
216
 
 * @param node The node which contains the item
217
 
 * @param item The item to whose status needs to be changed
218
 
 * @param newStatus TRUE to mark the item as read, FALSE to mark as unread
219
 
 */
220
 
void 
221
 
google_source_item_mark_read (nodePtr node, itemPtr item, gboolean newStatus);
222
 
 
223
 
/**
224
 
 * Get the root node (the nodeSource) from any given subnode. A convenience
225
 
 * function.
226
 
 *
227
 
 * @param node The node whose nodeSource is to be found
228
 
 * @return The nodeSource
229
 
 */
230
 
nodePtr
231
 
google_source_get_root_from_node (nodePtr node);
232
 
 
233
 
/**
234
 
 * Find a child node with the given source URL.
235
 
 *
236
 
 * @param gsource pointer to GoogleSource to access.
237
 
 * @param source  the source URL to search
238
 
 */
239
 
nodePtr
240
 
google_source_get_node_from_source (GoogleSourcePtr gsource, const gchar* source);
 
198
 * Find a child node with the given feed source URL.
 
199
 *
 
200
 * @param gsource       GoogleSource
 
201
 * @param source        a feed source URL to search
 
202
 *
 
203
 * @returns a node (or NULL)
 
204
 */
 
205
nodePtr google_source_get_node_from_source (GoogleSourcePtr gsource, const gchar* source);
241
206
 
242
207
/**
243
208
 * Tries to update the entire source quickly, by updating only those feeds
245
210
 * internal function.
246
211
 *
247
212
 * @param data A pointer to a node id of the source. This pointer will
248
 
 *             be g_free'd if the update fails and the function will return
249
 
 *             FALSE.  
 
213
 *             be g_free'd if the update fails.
 
214
 *
 
215
 * @returns FALSE on update failure
250
216
 */
251
 
gboolean
252
 
google_source_quick_update_timeout (gpointer gsource) ;
 
217
gboolean google_source_quick_update_timeout (gpointer gsource);
253
218
 
254
219
/**
255
220
 * Migrate a google source child-node from a Liferea 1.4 style read-only
257
222
 *
258
223
 * @param node The node to migrate (not the nodeSource!)
259
224
 */
260
 
void
261
 
google_source_migrate_node(nodePtr node);
 
225
void google_source_migrate_node (nodePtr node);
262
226
 
 
227
/**
 
228
 * Perform login for the given Google source.
 
229
 *
 
230
 * @param gsource       a GoogleSource
 
231
 * @param flags         network request flags
 
232
 */
263
233
void google_source_login (GoogleSourcePtr gsource, guint32 flags);
264
234
 
265
235
#endif