MaeLyrica/How to write plugins: Difference between revisions

From Maemo Wiki
Jump to navigationJump to search
imported>marmistrz
initial
 
imported>marmistrz
How to write a plugin for MaeLyrica?: info about toProviderCode
Line 1: Line 1:
== How to write a plugin for MaeLyrica? ==
== How to write a plugin for MaeLyrica? ==
 
=== Which data should be provided? ===
A MaeLyrica plug-in is just a class containing these functions and variables:
A MaeLyrica plug-in is just a class containing these functions and variables:


     virtual short perform(string a, string t); // OPTIONAL
     virtual std::string toProviderCode(string artist, string track) const;
    virtual CURLcode download(string a, string t);
    virtual string toProviderCode(string artist, string track) const;
     virtual bool parse();
     virtual bool parse();
    static const QString rooturl;


TO BE CONTINUED
The following function can be provided too:
    virtual short perform(string a, string t);
    virtual CURLcode download(string a, string t);
 
=== Requirements for functions ===
 
The toProviderCode function should return the URL as std::string, from which data should be downloaded. The default download function will follow any redirects.

Revision as of 12:48, 19 August 2012

How to write a plugin for MaeLyrica?

Which data should be provided?

A MaeLyrica plug-in is just a class containing these functions and variables:

   virtual std::string toProviderCode(string artist, string track) const;
   virtual bool parse();

The following function can be provided too:

   virtual short perform(string a, string t);
   virtual CURLcode download(string a, string t); 

Requirements for functions

The toProviderCode function should return the URL as std::string, from which data should be downloaded. The default download function will follow any redirects.