Ejemplo n.º 1
0
void AdminAuth()
{
    Zimbra::Rpc::AdminAuthRequest authRequest(lpAdminUser, lpAdminPwd, L"");
    Zimbra::Rpc::AdminConnection *m_pAdminConnection;
    Zimbra::Util::ScopedInterface<IXMLDOMDocument2> pResponseXml;

    m_pAdminConnection = new Zimbra::Rpc::AdminConnection(lpServerAddress, nAdminPort, TRUE, 0,
        L"");
    m_pAdminConnection->SetCurrentUser((LPWSTR)lpAccountUser);
    m_pAdminConnection->SendRequest(authRequest, pResponseXml.getref());
}
Ejemplo n.º 2
0
void UserAuth()
{
    Zimbra::Util::ScopedInterface<IXMLDOMDocument2> pResponseXml;

    m_pConnection = new Zimbra::Rpc::Connection(L"migration", lpServerAddress, nPort, false, 0,
        L"");

    m_pConnection->SetCurrentUser((LPWSTR)lpAccountUser);

    Zimbra::Rpc::AuthRequest authRequest(lpAccountUser, lpAccountUserPwd, lpServerAddress);

    m_pConnection->SendRequest(authRequest, pResponseXml.getref());

    Zimbra::Util::ScopedPtr<Zimbra::Rpc::Response> pResponse(
    Zimbra::Rpc::Response::Manager::NewResponse(pResponseXml.get()));
}