SubscribeCallback::Response OnSubscribe(JID From) { cout << "Got subscribe request from " << From.GetFullJID() << " I've decided to make friend with her" << endl; return SubscribeCallback::Response::AllowAndSubscribe; }
void OnPresence(JID From, bool Available, int Priority, string Status, string Message) { cout << "Got presence from " << From.GetFullJID() << " available: " << Available << " priority " << Priority << " status \"" << Status << "\" with message \"" << Message << "\"" << endl; }
void OnUnsubscribed(JID From) { cout << From.GetFullJID() << " doesnt want to be friend with me anymore." << " I will cancel my friendship with her!" << endl; }
void OnSubscribed(JID To) { cout << "I am now friend with " << To.GetFullJID() << endl; }