<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libmusicbrainz3: MusicBrainz::IWebService Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"> <ul> <li><a class="el" href="namespace_music_brainz.html">MusicBrainz</a> </li> <li><a class="el" href="class_music_brainz_1_1_i_web_service.html">MusicBrainz::IWebService</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <h1>MusicBrainz::IWebService Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="MusicBrainz::IWebService" --> <p>An interface all concrete web service classes have to implement. <a href="#_details">More...</a></p> <div class="dynheader"> Inheritance diagram for MusicBrainz::IWebService:</div> <div class="dyncontent"> <div class="center"> <img src="class_music_brainz_1_1_i_web_service.png" usemap="#MusicBrainz::IWebService_map" alt=""/> <map id="MusicBrainz::IWebService_map" name="MusicBrainz::IWebService_map"> <area href="class_music_brainz_1_1_web_service.html" alt="MusicBrainz::WebService" shape="rect" coords="0,56,160,80"/> </map> </div> <p><a href="class_music_brainz_1_1_i_web_service-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_music_brainz_1_1_i_web_service.html#a69f03af504c1274d7b6a5f41fb0b7e99">~IWebService</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_music_brainz_1_1_i_web_service.html#a366d622c1eed452af3756ee955ef62c3">get</a> (const std::string &entity, const std::string &id, const <a class="el" href="class_music_brainz_1_1_i_includes.html#afecd9a28c3be5892ec4ce11bcb4fd66e">IIncludes::IncludeList</a> &include, const <a class="el" href="class_music_brainz_1_1_i_filter.html#aaba1f8574aef404c9df93d340f10d611">IFilter::ParameterList</a> &filter, const std::string &version="1")=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_music_brainz_1_1_query.html" title="A simple interface to the MusicBrainz web service.">Query</a> the web service. <a href="#a366d622c1eed452af3756ee955ef62c3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_music_brainz_1_1_i_web_service.html#a6f16a6c0135d94fb970c36b92aa2af7f">post</a> (const std::string &entity, const std::string &id, const std::string &data, const std::string &version="1")=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Submit data to the web service. <a href="#a6f16a6c0135d94fb970c36b92aa2af7f"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>An interface all concrete web service classes have to implement. </p> <p>All web service classes have to implement this and follow the method specifications. </p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a69f03af504c1274d7b6a5f41fb0b7e99"></a><!-- doxytag: member="MusicBrainz::IWebService::~IWebService" ref="a69f03af504c1274d7b6a5f41fb0b7e99" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual MusicBrainz::IWebService::~IWebService </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a366d622c1eed452af3756ee955ef62c3"></a><!-- doxytag: member="MusicBrainz::IWebService::get" ref="a366d622c1eed452af3756ee955ef62c3" args="(const std::string &entity, const std::string &id, const IIncludes::IncludeList &include, const IFilter::ParameterList &filter, const std::string &version="1")=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual std::string MusicBrainz::IWebService::get </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>entity</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_music_brainz_1_1_i_includes.html#afecd9a28c3be5892ec4ce11bcb4fd66e">IIncludes::IncludeList</a> & </td> <td class="paramname"> <em>include</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_music_brainz_1_1_i_filter.html#aaba1f8574aef404c9df93d340f10d611">IFilter::ParameterList</a> & </td> <td class="paramname"> <em>filter</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>version</em> = <code>"1"</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="class_music_brainz_1_1_query.html" title="A simple interface to the MusicBrainz web service.">Query</a> the web service. </p> <p>Using this method, you can either get a resource by id (using the <em>id</em> parameter, or perform a query on all resources of a type.</p> <p>The <em>filter</em> and the <em>id</em> parameter exclude each other. If you are using a filter, you may not set <em>id</em> and vice versa.</p> <p>Returns a file-like object containing the result or raises a <a class="el" href="class_music_brainz_1_1_web_service_error.html" title="A web service error has occurred.">WebServiceError</a> or one of its subclasses in case of an error. Which one is used depends on the implementing class.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>entity</em> </td><td>a string containing the entity's name </td></tr> <tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>a string containing a UUID, or the empty string </td></tr> <tr><td valign="top"></td><td valign="top"><em>include</em> </td><td>a tuple containing values for the 'inc' parameter </td></tr> <tr><td valign="top"></td><td valign="top"><em>filter</em> </td><td>parameters, depending on the entity </td></tr> <tr><td valign="top"></td><td valign="top"><em>version</em> </td><td>a string containing the web service version to use</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a string contaning the returned data</dd></dl> <dl><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_music_brainz_1_1_web_service_error.html" title="A web service error has occurred.">WebServiceError</a>,:</em> </td><td>in case of errors </td></tr> </table> </dd> </dl> <p>Implemented in <a class="el" href="class_music_brainz_1_1_web_service.html#a5135fd0521855bf32c9f2b1ef8a59f93">MusicBrainz::WebService</a>.</p> </div> </div> <a class="anchor" id="a6f16a6c0135d94fb970c36b92aa2af7f"></a><!-- doxytag: member="MusicBrainz::IWebService::post" ref="a6f16a6c0135d94fb970c36b92aa2af7f" args="(const std::string &entity, const std::string &id, const std::string &data, const std::string &version="1")=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void MusicBrainz::IWebService::post </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>entity</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>version</em> = <code>"1"</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Submit data to the web service. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>entity</em> </td><td>a string containing the entity's name </td></tr> <tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>a string containing a UUID, or the empty string </td></tr> <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>a string containing the data to post </td></tr> <tr><td valign="top"></td><td valign="top"><em>version</em> </td><td>a string containing the web service version to use</td></tr> </table> </dd> </dl> <dl><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_music_brainz_1_1_web_service_error.html" title="A web service error has occurred.">WebServiceError</a></em> </td><td>in case of errors </td></tr> </table> </dd> </dl> <p>Implemented in <a class="el" href="class_music_brainz_1_1_web_service.html#a0587bdf75700342c1263a897c936cfdc">MusicBrainz::WebService</a>.</p> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>