Thanks for the help, I am happy to say I have got it working. All that needs to be changed is in podPress.php:
Add to the podPress_class_init function:
add_filter('xmlrpc_methods', 'add_new_xmlrpc_methods');
and then add two new functions:
function add_new_xmlrpc_methods ($methods) {
$methods ['podPress.addNewXmlrpcPost'] = 'addNewXmlrpcPost';
return $methods;
}
function addNewXmlrpcPost ($args) {
$xmlPostID = (int) $args[0];
$xmlContent = $args[1];
podPress_add_post_meta($xmlPostID, '_podPressMedia', $xmlContent, true);
}
Then data can be added by just calling RPclient.execute(“podPress.addNewXmlrpcPost”, params); on the client where params is an array: [int PostID, Hashtable xmlContent] and xmlContent has the structure that you have shown above.
Obviously this is very limited, but it does what I need it to do. I am also amusing all checks to make sure the data is correct is happening client side.
It looks like the already existing function (xmlrpc_post_addMedia in podpress_class.php) tries to achieve the same aim, but it expects a php style array as input and you can’t pass those via xml-rpc so there was no way successfully to call it.