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

« back to all changes in this revision

Viewing changes to src/parsers/ns_blogChannel.c

  • 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:
32
32
#define BLINK_START             "<p><div class=\"blogchanneltitle\"><b>Promoted Weblog</b></div></p>"
33
33
#define BLINK_END               ""
34
34
 
35
 
#define TAG_BLOGROLL            1
36
 
#define TAG_MYSUBSCRIPTIONS     2
 
35
typedef enum {
 
36
        TAG_BLOGROLL,
 
37
        TAG_MYSUBSCRIPTIONS,
 
38
} requestDataTagType;
37
39
 
38
40
struct requestData {
39
41
        feedParserCtxtPtr       ctxt;   /**< feed parsing context */
40
 
        gint                    tag;    /**< metadata id we're downloading (see TAG_*) */
 
42
        requestDataTagType      tag;    /**< metadata id we're downloading (see TAG_*) */
41
43
};
42
44
 
43
45
/* the spec at Userland http://backend.userland.com/blogChannelModule
145
147
                switch (requestData->tag) {
146
148
                        case TAG_BLOGROLL:
147
149
                                g_string_prepend (buffer, BLOGROLL_START);
148
 
                                break;
149
 
                        case TAG_MYSUBSCRIPTIONS:
150
 
                                g_string_prepend (buffer, MYSUBSCR_START);
151
 
                                break;
152
 
                }
153
 
 
154
 
                switch (requestData->tag) {
155
 
                        case TAG_BLOGROLL:
156
150
                                g_string_append (buffer, BLOGROLL_END);
157
151
                                g_hash_table_insert (requestData->ctxt->tmpdata, g_strdup ("bC:blogRoll"), buffer->str);
158
152
                                break;
159
153
                        case TAG_MYSUBSCRIPTIONS:
 
154
                                g_string_prepend (buffer, MYSUBSCR_START);
160
155
                                g_string_append (buffer, MYSUBSCR_END);
161
156
                                g_hash_table_insert (requestData->ctxt->tmpdata, g_strdup ("bC:mySubscriptions"), buffer->str);
162
157
                                break;
 
158
                        default:
 
159
                                g_error ("wrong requestData->tag value");
 
160
                                break;
163
161
                }
 
162
 
164
163
                g_string_free (buffer, FALSE);
165
164
 
166
165
                buffer = g_string_new (NULL);
176
175
}
177
176
 
178
177
static void
179
 
getOutlineList (feedParserCtxtPtr ctxt, guint tag, char *url)
 
178
getOutlineList (feedParserCtxtPtr ctxt, requestDataTagType tag, char *url)
180
179
{
181
180
        struct requestData      *requestData;
182
181
        updateRequestPtr        request;