~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431

« back to all changes in this revision

Viewing changes to src/online_service.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2009-04-22 21:39:19 UTC
  • mto: (4.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090422213919-52m015y6gcpv1m1g
Tags: upstream-0.12.0~svn2018
ImportĀ upstreamĀ versionĀ 0.12.0~svn2018

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
8
                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
9
9
    
10
 
    Copyright (C) 2006-2008 Gena Batyan <bgeradz@mediatomb.cc>,
 
10
    Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
11
11
                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
12
                            Leonhard Wimmer <leo@mediatomb.cc>
13
13
    
24
24
    version 2 along with MediaTomb; if not, write to the Free Software
25
25
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
26
26
    
27
 
    $Id: online_service.h 1698 2008-02-23 20:48:30Z lww $
 
27
    $Id: online_service.h 2010 2009-01-11 19:10:43Z lww $
28
28
*/
29
29
 
30
30
/// \file online_service.h
43
43
#define ONLINE_SERVICE_AUX_ID "ols"
44
44
#define ONLINE_SERVICE_LAST_UPDATE "lu"
45
45
 
46
 
typedef enum service_type_t
 
46
// make sure to add the storage prefixes when adding new services
 
47
typedef enum 
47
48
{
48
 
    OS_None    = 0,
49
 
    OS_YouTube = 1,
50
 
    OS_SopCast = 2,
 
49
    OS_None         = 0,
 
50
    OS_YouTube      = 1,
 
51
    OS_SopCast      = 2,
 
52
    OS_Weborama     = 3,
 
53
    OS_ATrailers    = 4,
51
54
    OS_Max
52
 
};
 
55
} service_type_t;
53
56
 
54
57
/// \brief This is an interface for all online services, the function
55
58
/// handles adding/refreshing content in the database.
86
89
    /// \brief Parses the service related line from config.xml and creates
87
90
    /// a task object, which can be anything that helps the service to
88
91
    /// identify what data it has to fetch.
89
 
    virtual zmm::Ref<zmm::Object> defineServiceTask(zmm::Ref<mxml::Element> xmlopt) = 0;
 
92
    virtual zmm::Ref<zmm::Object> defineServiceTask(zmm::Ref<mxml::Element> xmlopt, zmm::Ref<zmm::Object> params) = 0;
 
93
 
90
94
    /// \brief Increments the task count. 
91
95
    ///
92
96
    /// When recursive autoscan is in progress, we only want to subcribe to
127
131
    int purge_interval;
128
132
    zmm::Ref<zmm::Object> timer_parameter;
129
133
 
130
 
 
 
134
    /// \brief retrieves a required attribute given by the name
 
135
    zmm::String getCheckAttr(zmm::Ref<mxml::Element> xml, zmm::String attrname);
 
136
    /// \brief retrieves a required positive integer attribute given by the name
 
137
    int getCheckPosIntAttr(zmm::Ref<mxml::Element> xml, zmm::String attrname);
131
138
};
132
139
 
133
140
class OnlineServiceList : public zmm::Object