#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
 Copyright (C) 2004 jan gerber <j@reboot.fm>

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Library General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'''

# xmlrpc server interface for the config
#

import sys
import re_codec
from xmlrpclib  import *
from SimpleXMLRPCServer import *


if __name__ == '__main__':
    server = ServerProxy("http://localhost:96123")
    #print server
    #print server.system.listMethods()
    try:
        #server.setStreamSwitchOverwriteURL('http://localhost:8000/line-in.ogg')
        server.setStreamSwitchOverwriteURL('None')
        #server.setStreamSwitchOverwriteURL('http://encoder:8000/line-in.ogg')
        print "server.getStreamSwitchOverwriteURL(): ",server.getStreamSwitchOverwriteURL()

        print "\nsome status info:"
        print "jackmixer: ",server.jackmixerStatus()
        print "switch:    ",server.switchStatus()
        print "uptime:    ",server.uptime()

    except Error, v:
        print "ERROR", v
