home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / idl / GNOME_Media_CDDBSlave2.idl < prev    next >
Encoding:
Text File  |  2006-08-30  |  2.9 KB  |  135 lines

  1. /*
  2.  * GNOME_Media_CDDBSlave2.idl: IDL file for the CDDBSlave 2 interface
  3.  *
  4.  * Copyright (C) 2001 Ximian, Inc.
  5.  *
  6.  * Authors: Iain Holmes  <iain@ximian.com>
  7.  */
  8.  
  9. #include <Bonobo.idl>
  10.  
  11. module GNOME {
  12.  
  13. module Media {
  14.  
  15.     /* As a note, I hate making this a seperate interface
  16.        but it seems that hiding and showing widgets inside
  17.        Bonobo::Control's is not a good thing.
  18.  
  19.        Lots of love
  20.        Iain */
  21.     interface CDDBTrackEditor : Bonobo::Unknown {
  22.         void setDiscID (in string discid);
  23.         
  24.         void showWindow ();
  25.     };
  26.     
  27.     interface CDDBSlave2 : Bonobo::Unknown {
  28.  
  29.         enum Result {
  30.             OK,
  31.             REQUEST_PENDING,
  32.             ERROR_CONTACTING_SERVER,
  33.             ERROR_RETRIEVING_DATA,
  34.             MALFORMED_DATA,
  35.             IO_ERROR,
  36.             UNKNOWN_ENTRY
  37.         };
  38.  
  39.         struct QueryResult {
  40.             string discid;
  41.             Result result;
  42.         };
  43.  
  44.         struct TrackInfo {
  45.             string name;
  46.             short length;
  47.             string comment;
  48.         };
  49.         typedef sequence<TrackInfo> TrackList;
  50.         
  51.         exception UnknownDiscID {};
  52.         /**
  53.          * query: Queries the server for a CD
  54.           * @discid: CDDB disc id.
  55.          * @ntrks:  Number of tracks on the cd.
  56.          * @offsets: A string of all the frame offsets of the starting
  57.            *           location of each track, seperated by spaces.
  58.          * @nsecs: Total playing length of the CD in seconds.
  59.          * @name: Client name.
  60.          * @version: Client version.
  61.          *
  62.          * Sends a query to the server.
  63.          */
  64.         void query(in string discid,
  65.                    in short ntrks,
  66.                   in string offsets,
  67.                   in long nsecs,
  68.                   in string name,
  69.                   in string version);
  70.  
  71.         /**
  72.          * save: Writes a CDDB entry to disc.
  73.          */
  74.         void save(in string discid)
  75.             raises (UnknownDiscID);
  76.         
  77.         /**
  78.          * discid: CDDB disc id.
  79.          * 
  80.          * checks if the slave has the entry marked as valid.
  81.          */
  82.         boolean isValid (in string discid)
  83.             raises (UnknownDiscID);
  84.  
  85.         /**
  86.          * discid: CDDB disc id.
  87.          * 
  88.          * Returns the artist of @discid
  89.          */
  90.         string getArtist (in string discid)
  91.             raises (UnknownDiscID);
  92.         void setArtist (in string discid,
  93.                 in string artist)
  94.             raises (UnknownDiscID);
  95.  
  96.         /**
  97.          * discid: CDDB disc id.
  98.          */
  99.         string getDiscTitle (in string discid)
  100.             raises (UnknownDiscID);
  101.         void setDiscTitle (in string discid,
  102.                    in string disctitle)
  103.             raises (UnknownDiscID);
  104.  
  105.         short getNTrks (in string discid)
  106.             raises (UnknownDiscID);
  107.  
  108.         void getAllTracks (in string discid,
  109.                    out TrackList names)
  110.             raises (UnknownDiscID);
  111.         void setAllTracks (in string discid,
  112.                    in TrackList names)
  113.             raises (UnknownDiscID);
  114.                    
  115.         string getComment (in string discid)
  116.             raises (UnknownDiscID);
  117.         void setComment (in string discid,
  118.                  in string comment)
  119.             raises (UnknownDiscID);
  120.                  
  121.         short getYear (in string discid)
  122.             raises (UnknownDiscID);
  123.         void setYear (in string discid,
  124.                   in short year)
  125.             raises (UnknownDiscID);
  126.                   
  127.         string getGenre (in string discid)
  128.             raises (UnknownDiscID);
  129.         void setGenre (in string discid,
  130.                    in string genre)
  131.             raises (UnknownDiscID);
  132.     };
  133. };
  134. };  
  135.