Pogger/src/FeedController.h

47 lines
806 B
C
Raw Normal View History

2021-01-09 16:53:39 -06:00
/*
* Copyright 2020, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef FEEDCONTROLLER_H
#define FEEDCONTROLLER_H
#include <SupportDefs.h>
#include <OS.h>
2021-01-13 20:23:21 -06:00
class BList;
2021-01-09 16:53:39 -06:00
class BMessage;
enum
{
kEnqueueFeed = 'fenq',
kClearQueue = 'frmq',
2021-02-18 23:16:45 -06:00
kDownloadStart = 'fdst',
kDownloadComplete = 'fdlc',
kDownloadFail = 'fdlf',
kParseComplete = 'fpec',
kParseFail = 'fpef',
2021-01-12 15:30:21 -06:00
kUpdateSubscribed = 'fups'
2021-01-09 16:53:39 -06:00
};
class FeedController{
public:
FeedController();
~FeedController();
2021-01-09 16:53:39 -06:00
void MessageReceived(BMessage* msg);
2021-01-13 20:23:21 -06:00
static BList SubscribedFeeds();
2021-01-09 16:53:39 -06:00
private:
static int32 _DownloadLoop(void* ignored);
static int32 _ParseLoop(void* ignored);
thread_id fDownloadThread;
thread_id fParseThread;
};
#endif // FEEDCONTROLLER_H