#region Copyright (c) 2003, newtelligence AG. All rights reserved.
/*
// Copyright (c) 2003, newtelligence AG. (http://www.newtelligence.com)
// Original BlogX Source Code: Copyright (c) 2003, Chris Anderson (http://simplegeek.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted
// provided that the following conditions are met:
//
// (1) Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
// (2) Redistributions in binary form must reproduce the above copyright notice, this list of
// conditions and the following disclaimer in the documentation and/or other materials
// provided with the distribution.
// (3) Neither the name of the newtelligence AG nor the names of its contributors may be used
// to endorse or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// -------------------------------------------------------------------------
//
// Original BlogX source code (c) 2003 by Chris Anderson (http://simplegeek.com)
//
// newtelligence is a registered trademark of newtelligence Aktiengesellschaft.
//
// For portions of this software, the some additional copyright notices may apply
// which can either be found in the license.txt file included in the source distribution
// or following this notice.
//
*/
#endregion
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using Microsoft.ServiceModel.Samples.XmlRpc;
namespace newtelligence.DasBlog.Runtime.Proxies{
public interface IBloggerAPI :
dasBlog.Services.Contracts.Blogger.IBlogger,
dasBlog.Services.Contracts.MetaWebLog.IMetaWeblog,
dasBlog.Services.Contracts.MovableType.IMovableType
{ }
public interface BloggerAPIChannel :
IBloggerAPI,
System.ServiceModel.IClientChannel
{ }
/// <summary>
/// Summary description for BloggerAPIClientProxy.
/// </summary>
public class BloggerAPIClientProxy : System.ServiceModel.ClientBase<BloggerAPIChannel>, IBloggerAPI
{
public BloggerAPIClientProxy():base()
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
public BloggerAPIClientProxy(string endpointConfigurationName)
: base(endpointConfigurationName)
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
public BloggerAPIClientProxy(string endpointConfigurationName, EndpointAddress remoteAddress)
: base(endpointConfigurationName, remoteAddress)
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
public BloggerAPIClientProxy(string endpointConfigurationName, string remoteAddress)
: base(endpointConfigurationName, remoteAddress)
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
public BloggerAPIClientProxy(Binding binding, EndpointAddress remoteAddress)
: base(binding, remoteAddress)
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
public BloggerAPIClientProxy(EndpointAddress remoteAddress)
: base(new XmlRpcHttpBinding(), remoteAddress)
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
public BloggerAPIClientProxy(Uri remoteAddress)
: base(new XmlRpcHttpBinding(), new EndpointAddress(remoteAddress))
{
this.Endpoint.Behaviors.Add(new XmlRpcEndpointBehavior());
}
#region IBlogger Members
public bool blogger_deletePost(string appKey, string postid, string username, string password, bool publish)
{
return base.Channel.blogger_deletePost(appKey, postid, username, password, publish);
}
public bool blogger_editPost(string appKey, string postid, string username, string password, string content, bool publish)
{
return base.Channel.blogger_editPost(appKey, postid, username, password, content, publish);
}
public dasBlog.Services.Contracts.Blogger.Category[] blogger_getCategories(string blogid, string username, string password)
{
return base.Channel.blogger_getCategories(blogid, username, password);
}
public dasBlog.Services.Contracts.Blogger.Post blogger_getPost(string appKey, string postid, string username, string password)
{
return base.Channel.blogger_getPost(appKey, postid, username, password);
}
public dasBlog.Services.Contracts.Blogger.Post[] blogger_getRecentPosts(string appKey, string blogid, string username, string password, int numberOfPosts)
{
return base.Channel.blogger_getRecentPosts(appKey, blogid, username, password, numberOfPosts);
}
public string blogger_getTemplate(string appKey, string blogid, string username, string password, string templateType)
{
return base.Channel.blogger_getTemplate(appKey, blogid, username, password, templateType);
}
public dasBlog.Services.Contracts.Blogger.UserInfo blogger_getUserInfo(string appKey, string username, string password)
{
return base.Channel.blogger_getUserInfo(appKey, username, password);
}
public dasBlog.Services.Contracts.Blogger.BlogInfo[] blogger_getUsersBlogs(string appKey, string username, string password)
{
return base.Channel.blogger_getUsersBlogs(appKey, username, password);
}
public string blogger_newPost(string appKey, string blogid, string username, string password, string content, bool publish)
{
return base.Channel.blogger_newPost(appKey, blogid,username, password, content, publish);
}
public bool blogger_setTemplate(string appKey, string blogid, string username, string password, string template, string templateType)
{
return base.Channel.blogger_setTemplate(appKey, blogid, username, password, template, templateType);
}
#endregion
#region IMetaWeblog Members
public bool metaweblog_editPost(string postid, string username, string password, dasBlog.Services.Contracts.MetaWebLog.Post post, bool publish)
{
return base.Channel.metaweblog_editPost(postid, username, password, post, publish);
}
public dasBlog.Services.Contracts.MetaWebLog.CategoryInfo[] metaweblog_getCategories(string blogid, string username, string password)
{
return base.Channel.metaweblog_getCategories(blogid, username, password);
}
public dasBlog.Services.Contracts.MetaWebLog.Post metaweblog_getPost(string postid, string username, string password)
{
return base.Channel.metaweblog_getPost(postid, username, password);
}
public dasBlog.Services.Contracts.MetaWebLog.Post[] metaweblog_getRecentPosts(string blogid, string username, string password, int numberOfPosts)
{
return base.Channel.metaweblog_getRecentPosts(blogid, username, password, numberOfPosts);
}
public string metaweblog_newPost(string blogid, string username, string password, dasBlog.Services.Contracts.MetaWebLog.Post post, bool publish)
{
return base.Channel.metaweblog_newPost(blogid, username, password, post, publish);
}
public dasBlog.Services.Contracts.MetaWebLog.UrlInfo metaweblog_newMediaObject(string blogid, string username, string password, dasBlog.Services.Contracts.MetaWebLog.MediaType enc)
{
return base.Channel.metaweblog_newMediaObject(blogid, username, password, enc);
}
#endregion
#region IMovableType Members
public dasBlog.Services.Contracts.MovableType.Category[] mt_getCategoryList(string blogid, string username, string password)
{
return base.Channel.mt_getCategoryList(blogid, username, password);
}
public dasBlog.Services.Contracts.MovableType.Category[] mt_getPostCategories(string postid, string username, string password)
{
return base.Channel.mt_getPostCategories(postid, username, password);
}
public dasBlog.Services.Contracts.MovableType.PostTitle[] mt_getRecentPostTitles(string blogid, string username, string password, int numberOfPosts)
{
return base.Channel.mt_getRecentPostTitles(blogid, username, password, numberOfPosts);
}
public dasBlog.Services.Contracts.MovableType.TrackbackPing[] mt_getTrackbackPings(string postid)
{
return base.Channel.mt_getTrackbackPings(postid);
}
public bool mt_publishPost(string postid, string username, string password)
{
return base.Channel.mt_publishPost(postid, username, password);
}
public bool mt_setPostCategories(string postid, string username, string password, dasBlog.Services.Contracts.MovableType.Category[] categories)
{
return base.Channel.mt_setPostCategories(postid,username,password,categories);
}
public string[] mt_supportedMethods()
{
return base.Channel.mt_supportedMethods();
}
public dasBlog.Services.Contracts.MovableType.TextFilter[] mt_supportedTextFilters()
{
return base.Channel.mt_supportedTextFilters();
}
#endregion
}
}
|