axmol/plugin/samples/HelloSocial/Classes/MyShareManager.h

38 lines
818 B
C
Raw Normal View History

2013-04-24 16:00:36 +08:00
#ifndef __MY_SHARE_MANAGER_H__
#define __MY_SHARE_MANAGER_H__
#include "SocialTwitter.h"
class MyShareResult : public cocos2d::plugin::ShareResultListener
{
public:
virtual void shareResult(cocos2d::plugin::EShareResult ret, const char* msg, cocos2d::plugin::TShareInfo info);
};
class MyShareManager
{
public:
static MyShareManager* sharedManager();
static void purgeManager();
typedef enum {
eNoneMode = 0,
eTwitter,
} MyShareMode;
void unloadSocialPlugin();
void loadSocialPlugin();
void shareByMode(cocos2d::plugin::TShareInfo info, MyShareMode mode);
private:
MyShareManager();
virtual ~MyShareManager();
static MyShareManager* s_pManager;
cocos2d::plugin::SocialTwitter* s_pTwitter;
MyShareResult* s_pRetListener;
};
#endif // __MY_SHARE_MANAGER_H__