Changeset - 23782242786f
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-03-30 14:05:41
hanzz.k@gmail.com
Send empty roster as response to roster get
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/rosterresponder.cpp
Show inline comments
 
@@ -16,29 +16,31 @@
 
 * You should have received a copy of the GNU General Public License
 
 * along with this program; if not, write to the Free Software
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 
 */
 

	
 
#include "rosterresponder.h"
 

	
 
#include <iostream>
 
#include <boost/bind.hpp>
 
#include "Swiften/Queries/IQRouter.h"
 
#include "Swiften/Swiften.h"
 

	
 
using namespace Swift;
 
using namespace boost;
 

	
 
namespace Transport {
 

	
 
RosterResponder::RosterResponder(Swift::IQRouter *router) : Swift::GetResponder<RosterPayload>(router) {
 
}
 

	
 
RosterResponder::~RosterResponder() {
 
}
 

	
 
bool RosterResponder::handleGetRequest(const Swift::JID& from, const Swift::JID& to, const std::string& id, boost::shared_ptr<Swift::RosterPayload> payload) {
 
	std::cout << "PAYLOAD\n";
 
	// Get means we're in server mode and user wants to fetch his roster.
 
	// For now we send empty reponse, but TODO: Get buddies from database and send proper stored roster.
 
	sendResponse(from, id, boost::shared_ptr<RosterPayload>(new RosterPayload()));
 
	return true;
 
}
 

	
 
}
0 comments (0 inline, 0 general)