/**
 * service.h: Service interface for other plugins that want to scrobble music
 * 
 * Copyright: See COPYING file that comes with this distribution
 *
 * Author: Matthias Feistel <hitman_47@users.sourceforge.net>, (C) 2007
 */

#ifndef _SERVICE_H
#define _SERVICE_H

typedef int (* Submission_LastfmHandle)(
		const std::string submissionurl, const std::string sessionid,
		const std::string artist, const std::string track, const std::string secs,
		const std::string source, const int position, const int total,
		const std::string album, const std::string tracktime,
		const std::string tracknumber, const std::string mb_trackid,
		const std::string rating );

typedef int (* PlayingNow_LastfmHandle)( const std::string submissionurl,
		const std::string sessionid, const std::string artist,
		const std::string track, const std::string album,
		const std::string secs, const std::string tracknumber,
		const std::string mb_trackid );

typedef int (* HandshakeV12_LastfmHandle)( const std::string username,
		const std::string password_md5, std::string &data_npurl,
		std::string &data_protourl, std::string &data_sessionid );

struct SubmissionHandle_v1_0
{
	Submission_LastfmHandle Submission;
	PlayingNow_LastfmHandle PlayingNow;
	HandshakeV12_LastfmHandle HandshakeV12;
};

static const char
		*const LASTFM_SUBMISSION_HANDLE_v1_0 = "lastfm_submission_v1_0";

#endif // _SERVICE_H
