Keeps the connection to the MPD server and handels the most basic structure of the MPD protocol. The high level commands are handeled in the Libmpc.Mpc class.
Ejemplo n.º 1
0
 public static int ConnectToMPD()
 {
     try
     {
         mpcconn = new MpcConnection(mpdip);
         //mpcconn.Connect();
     }
     catch (Exception e)
     {
         error = e.Message;
         return 1;
     }
     if (mpcconn.Connected)
     {
         serverVersion = mpcconn.Version;
         mpc.Connection = mpcconn;
         return 0;
     }
     return 2;
 }
Ejemplo n.º 2
0
 private void OnSubsystemsChangedHandler(MpcConnection connection, Mpc.Subsystems subsystems)
 {
     if (this.OnSubsystemsChanged != null)
     this.OnSubsystemsChanged(this, subsystems);
 }
Ejemplo n.º 3
0
 private void onMpcConnectionDisconnected(MpcConnection connection)
 {
     if (this.OnDisconnected != null)
     this.OnDisconnected.Invoke(this);
 }