Changeset - 7166b462847f
[Not reviewed]
0 1 0
Sarang Bharadwaj - 13 years ago 2012-07-02 12:48:29
sarang.bh@gmail.com
Chatroom mode
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
backends/twitter/TwitterPlugin.cpp
Show inline comments
 
@@ -56,26 +56,26 @@ TwitterPlugin::TwitterPlugin(Config *config, Swift::SimpleEventLoop *loop, Stora
 
	OAUTH_SECRET = "oauth_secret";
 

	
 
	m_factories = new Swift::BoostNetworkFactories(loop);
 
	m_conn = m_factories->getConnectionFactory()->createConnection();
 
	m_conn->onDataRead.connect(boost::bind(&TwitterPlugin::_handleDataRead, this, _1));
 
	m_conn->connect(Swift::HostAddressPort(Swift::HostAddress(host), port));
 

	
 
	tp = new ThreadPool(loop_, 10);
 
		
 
	tweet_timer = m_factories->getTimerFactory()->createTimer(60000);
 
	message_timer = m_factories->getTimerFactory()->createTimer(60000);
 

	
 
	//tweet_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForTweets, this));
 
	//message_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForDirectMessages, this));
 
	tweet_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForTweets, this));
 
	message_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForDirectMessages, this));
 

	
 
	tweet_timer->start();
 
	message_timer->start();
 
	
 
	LOG4CXX_INFO(logger, "Starting the plugin.");
 
}
 

	
 
TwitterPlugin::~TwitterPlugin() 
 
{
 
	delete storagebackend;
 
	std::map<std::string, twitCurl*>::iterator it;
 
	for(it = sessions.begin() ; it != sessions.end() ; it++) delete it->second;
0 comments (0 inline, 0 general)