Index: /trunk/xmlrpc.php
===================================================================
--- /trunk/xmlrpc.php	(revision 8113)
+++ /trunk/xmlrpc.php	(revision 8114)
@@ -128,4 +128,6 @@
 			'wp.getPageStatusList'	=> 'this:wp_getPageStatusList',
 			'wp.getPageTemplates'	=> 'this:wp_getPageTemplates',
+			'wp.getOptions'			=> 'this:wp_getOptions',
+			'wp.setOptions'			=> 'this:wp_setOptions',
 
 			// Blogger API
@@ -172,4 +174,6 @@
 			'demo.addTwoNumbers' => 'this:addTwoNumbers'
 		);
+
+		$this->initialise_blog_option_info( );
 		$this->methods = apply_filters('xmlrpc_methods', $this->methods);
 		$this->IXR_Server($this->methods);
@@ -254,4 +258,56 @@
 			}
 		}
+	}
+
+	function initialise_blog_option_info( ) {
+		global $wp_version;
+
+		$this->blog_options = array(
+			// Read only options
+			'software_name'		=> array(
+				'desc'			=> __( 'Software Name' ),
+				'readonly'		=> true,
+				'value'			=> 'WordPress'
+			),
+			'software_version'	=> array(
+				'desc'			=> __( 'Software Version' ),
+				'readonly'		=> true,
+				'value'			=> $wp_version
+			),
+			'blog_url'			=> array(
+				'desc'			=> __( 'Blog URL' ),
+				'readonly'		=> true,
+				'option'		=> 'siteurl'
+			),
+
+			// Updatable options
+			'time_zone'			=> array(
+				'desc'			=> __( 'Time Zone' ),
+				'readonly'		=> false,
+				'option'		=> 'gmt_offset'
+			),
+			'blog_title'		=> array(
+				'desc'			=> __( 'Blog Title' ),
+				'readonly'		=> false,
+				'option'			=> 'blogname'
+			),
+			'blog_tagline'		=> array(
+				'desc'			=> __( 'Blog Tagline' ),
+				'readonly'		=> false,
+				'option'		=> 'blogdescription'
+			),
+			'date_format'		=> array(
+				'desc'			=> __( 'Date Format' ),
+				'readonly'		=> false,
+				'option'		=> 'date_format'
+			),
+			'time_format'		=> array(
+				'desc'			=> __( 'Time Format' ),
+				'readonly'		=> false,
+				'option'		=> 'time_format'
+			)
+		);
+
+		$this->blog_options = apply_filters( 'xmlrpc_blog_options', $this->blog_options );
 	}
 
@@ -863,4 +919,75 @@
 	}
 
+	function wp_getOptions( $args ) {
+		$this->escape( $args );
+
+		$blog_id	= (int) $args[0];
+		$username	= $args[1];
+		$password	= $args[2];
+		$options	= (array) $args[3];
+
+		if( !$this->login_pass_ok( $username, $password ) )
+			return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );
+
+		$user = set_current_user( 0, $username );
+
+		// If no specific options where asked for, return all of them
+		if (count( $options ) == 0 ) {
+			$options = array_keys($this->blog_options);
+		}
+
+		return $this->_getOptions($options);
+	}
+
+	function _getOptions($options)
+	{
+		$data = array( );
+		foreach( $options as $option ) {
+			if( array_key_exists( $option, $this->blog_options ) )
+			{
+				$data[$option] = $this->blog_options[$option];
+				//Is the value static or dynamic?
+				if( isset( $data[$option]['option'] ) ) {
+					$data[$option]['value'] = get_option( $data[$option]['option'] );
+					unset($data[$option]['option']);
+				}
+			}
+		}
+
+		return $data;
+	}
+
+	function wp_setOptions( $args ) {
+		$this->escape( $args );
+
+		$blog_id	= (int) $args[0];
+		$username	= $args[1];
+		$password	= $args[2];
+		$options	= (array) $args[3];
+
+		if( !$this->login_pass_ok( $username, $password ) )
+			return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );
+
+		$user = set_current_user( 0, $username );
+		if( !current_user_can( 'manage_options' ) )
+			return new IXR_Error( 403, __( 'You are not allowed to update options.' ) );
+
+		foreach( $options as $o_name => $o_value ) {
+			$option_names[] = $o_name;
+			if( empty( $o_value ) )
+				continue;
+
+			if( !array_key_exists( $o_name, $this->blog_options ) )
+				continue;
+
+			if( $this->blog_options[$o_name]['readonly'] == true )
+				continue;
+
+			update_option( $this->blog_options[$o_name]['option'], $o_value );
+		}
+
+		//Now return the updated values
+		return $this->_getOptions($option_names);
+	}
 
 	/* Blogger API functions
