# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /var/www/GSoC/wordtrunk/wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: class-wp-xmlrpc-server.php
--- class-wp-xmlrpc-server.php Base (BASE)
+++ class-wp-xmlrpc-server.php Locally Modified (Based On LOCAL)
@@ -64,6 +64,7 @@
 			'wp.getMediaItem'		=> 'this:wp_getMediaItem',
 			'wp.getMediaLibrary'	=> 'this:wp_getMediaLibrary',
 			'wp.getPostFormats'     => 'this:wp_getPostFormats',
+                        'wp.getPostTypes'       => 'this:wp_getPostTypes',
 
 			// Blogger API
 			'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
@@ -1702,6 +1703,58 @@
 		return $formats;
 	}
 
+        /**
+         * Retrieves a post types
+         *
+         * @uses get_post_types()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         * @return array
+         */
+        function wp_getPostTypes( $args ) {
+
+		$this->escape( $args );
+
+                $blog_ID            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+
+		if ( ! $user = $this->login( $username, $password ) )
+			return $this->error;
+
+                $post_types = get_post_types( '','objects' );
+
+                $struct = array();
+
+                foreach( $post_types as $post_type ) {
+
+                        // capability check for post_types
+                        if( ! current_user_can( $post_type->cap->edit_posts ) )
+                                continue;
+
+                        $post_type = (array)$post_type;
+
+                        $post_type_data = array(
+                                'labels'            => $post_type['labels'],
+                                'description'       => $post_type['description'],
+                                'capability_type'   => $post_type['capability_type'],
+                                'cap'               => $post_type['cap'],
+                                'map_meta_cap'      => $post_type['map_meta_cap'],
+                                'hierarchical'      => $post_type['hierarchical'],
+                                'menu_position'     => $post_type['menu_position'],
+                                'taxonomies'        => get_object_taxonomies( $post_type['name'] ),
+                        );
+
+                        $struct[ $post_type['name'] ] =  $post_type_data;
+
+                }
+
+                return $struct;
+        
+        }
+        
 	/* Blogger API functions.
 	 * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/
 	 */
