MsnSession * msn_session_new(PurpleAccount *account) { MsnSession *session; g_return_val_if_fail(account != NULL, NULL); session = g_new0(MsnSession, 1); session->http_reqs = purple_http_connection_set_new(); session->account = account; session->notification = msn_notification_new(session); session->userlist = msn_userlist_new(session); session->user = msn_user_new(session->userlist, purple_account_get_username(account), NULL); msn_userlist_add_user(session->userlist, session->user); session->oim = msn_oim_new(session); session->protocol_ver = 0; session->enable_mpop = TRUE; /* Default only */ session->guid = rand_guid(); session->soap = msn_soap_service_new(session); return session; }
MsnSession * msn_session_new(PurpleAccount *account) { MsnSession *session; g_return_val_if_fail(account != NULL, NULL); session = g_new0(MsnSession, 1); session->account = account; session->notification = msn_notification_new(session); session->userlist = msn_userlist_new(session); session->user = msn_user_new(session->userlist, purple_account_get_username(account), NULL); session->oim = msn_oim_new(session); session->protocol_ver = WLM_PROT_VER; return session; }