// Path: platform/src/main/java/cn/joy/libs/platform/qq/QQShare.java
// public class QQShare extends QQShareBase {
// 
// 	public QQShare(QQ platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public QQShare(QQ platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	protected boolean checkInstall() {
// 		return Utils.isQQInstall();
// 	}
// 
// 	@Override
// 	int getShareTarget() {
// 		return SHARE_TARGET_QQ;
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/qq/QZoneShare.java
// public class QZoneShare extends QQShareBase {
// 
// 	public QZoneShare(QQ platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public QZoneShare(QQ platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	int getShareTarget() {
// 		return SHARE_TARGET_QZONE;
// 	}
// 
// 	@Override
// 	protected boolean checkInstall() {
// 		return Utils.isQZoneInstall();
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/sina/SinaWeiboShare.java
// public class SinaWeiboShare extends ShareWithReceiver<Sina> {
// 
// 	private IWeiboShareAPI sdk;
// 
// 	public SinaWeiboShare(Sina platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public SinaWeiboShare(Sina platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	protected boolean checkInstall() {
// 		return WeiboShareSDK.createWeiboAPI(getPlatform().getContext(), getPlatform().getKey()).isWeiboAppInstalled();
// 	}
// 
// 	@Override
// 	protected boolean checkArgs() {
// 		return true;
// 	}
// 
// 	@Override
// 	public boolean share() {
// 		if (!super.share())
// 			return false;
// 		new Thread(new Runnable() {
// 			@Override
// 			public void run() {
// 				WeiboMultiMessage message = null;
// 				switch (getShareParams().getShareType()) {
// 					case Text:
// 					case Image:
// 						message = new SinaWeiboShareTextMessage(getShareParams()).createMessage();
// 						break;
// 					case TextAndImage:
// 						message = new SinaWeiboShareImageAndTextMessage(getShareParams()).createMessage();
// 						break;
// 					case WebPage:
// 						message = new SinaWeiboShareWebPageMessage(getShareParams()).createMessage();
// 						break;
// 				}
// 				SinaWeiboEntryActivity.share(getShareParams().getShareActivity(), message);
// 			}
// 		}).start();
// 		return true;
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/wechat/WeChatMomentsShare.java
// public class WeChatMomentsShare extends WeChatShareBase {
// 
// 	public WeChatMomentsShare(WeChat platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public WeChatMomentsShare(WeChat platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	public int getScene() {
// 		return SendMessageToWX.Req.WXSceneTimeline;
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/wechat/WeChatShare.java
// public class WeChatShare extends WeChatShareBase {
// 	public WeChatShare(WeChat platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public WeChatShare(WeChat platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	public int getScene() {
// 		return SendMessageToWX.Req.WXSceneSession;
// 	}
// }


import cn.joy.libs.platform.qq.QQShare;
import cn.joy.libs.platform.qq.QZoneShare;
import cn.joy.libs.platform.sina.SinaWeiboShare;
import cn.joy.libs.platform.wechat.WeChatMomentsShare;
import cn.joy.libs.platform.wechat.WeChatShare;
package cn.joy.libs.platform;



/**
 * User: JiYu
 * Date: 2016-07-27
 * Time: 10-02
 */

class ShareFactory {

	static Share create(Share.Target item, ShareParams params, boolean shareByClient) {
		Share share = null;
		switch (item) {
			case Wechat:
				share = new WeChatShare(PlatformFactory.getWechat(), params, shareByClient);
				break;
			case WechatMoments:
				share = new WeChatMomentsShare(PlatformFactory.getWechat(), params, shareByClient);
				break;
// Path: platform/src/main/java/cn/joy/libs/platform/qq/QQShare.java
// public class QQShare extends QQShareBase {
// 
// 	public QQShare(QQ platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public QQShare(QQ platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	protected boolean checkInstall() {
// 		return Utils.isQQInstall();
// 	}
// 
// 	@Override
// 	int getShareTarget() {
// 		return SHARE_TARGET_QQ;
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/qq/QZoneShare.java
// public class QZoneShare extends QQShareBase {
// 
// 	public QZoneShare(QQ platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public QZoneShare(QQ platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	int getShareTarget() {
// 		return SHARE_TARGET_QZONE;
// 	}
// 
// 	@Override
// 	protected boolean checkInstall() {
// 		return Utils.isQZoneInstall();
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/sina/SinaWeiboShare.java
// public class SinaWeiboShare extends ShareWithReceiver<Sina> {
// 
// 	private IWeiboShareAPI sdk;
// 
// 	public SinaWeiboShare(Sina platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public SinaWeiboShare(Sina platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	protected boolean checkInstall() {
// 		return WeiboShareSDK.createWeiboAPI(getPlatform().getContext(), getPlatform().getKey()).isWeiboAppInstalled();
// 	}
// 
// 	@Override
// 	protected boolean checkArgs() {
// 		return true;
// 	}
// 
// 	@Override
// 	public boolean share() {
// 		if (!super.share())
// 			return false;
// 		new Thread(new Runnable() {
// 			@Override
// 			public void run() {
// 				WeiboMultiMessage message = null;
// 				switch (getShareParams().getShareType()) {
// 					case Text:
// 					case Image:
// 						message = new SinaWeiboShareTextMessage(getShareParams()).createMessage();
// 						break;
// 					case TextAndImage:
// 						message = new SinaWeiboShareImageAndTextMessage(getShareParams()).createMessage();
// 						break;
// 					case WebPage:
// 						message = new SinaWeiboShareWebPageMessage(getShareParams()).createMessage();
// 						break;
// 				}
// 				SinaWeiboEntryActivity.share(getShareParams().getShareActivity(), message);
// 			}
// 		}).start();
// 		return true;
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/wechat/WeChatMomentsShare.java
// public class WeChatMomentsShare extends WeChatShareBase {
// 
// 	public WeChatMomentsShare(WeChat platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public WeChatMomentsShare(WeChat platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	public int getScene() {
// 		return SendMessageToWX.Req.WXSceneTimeline;
// 	}
// }
// 
// Path: platform/src/main/java/cn/joy/libs/platform/wechat/WeChatShare.java
// public class WeChatShare extends WeChatShareBase {
// 	public WeChatShare(WeChat platform, ShareParams params) {
// 		super(platform, params);
// 	}
// 
// 	public WeChatShare(WeChat platform, ShareParams params, boolean shareByClient) {
// 		super(platform, params, shareByClient);
// 	}
// 
// 	@Override
// 	public int getScene() {
// 		return SendMessageToWX.Req.WXSceneSession;
// 	}
// }


// Path: platform/src/main/java/cn/joy/libs/platform/ShareFactory.java
import cn.joy.libs.platform.qq.QQShare;
import cn.joy.libs.platform.qq.QZoneShare;
import cn.joy.libs.platform.sina.SinaWeiboShare;
import cn.joy.libs.platform.wechat.WeChatMomentsShare;
import cn.joy.libs.platform.wechat.WeChatShare;

package cn.joy.libs.platform;



/**
 * User: JiYu
 * Date: 2016-07-27
 * Time: 10-02
 */

class ShareFactory {

	static Share create(Share.Target item, ShareParams params, boolean shareByClient) {
		Share share = null;
		switch (item) {
			case Wechat:
				share = new WeChatShare(PlatformFactory.getWechat(), params, shareByClient);
				break;
			case WechatMoments:
				share = new WeChatMomentsShare(PlatformFactory.getWechat(), params, shareByClient);
				break;
			case QQ: