示例#1
0
bool accountExists(){

    Accounts::Manager *manager;
    manager = new Accounts::Manager();
    Accounts::AccountIdList accl = manager->accountList();
    Accounts::Account *a;
    Accounts::ServiceList ss;
    for(int i =0; i<accl.length(); i++)
    {

        a = manager->account(accl[i]);
        ss = a->services();

        for (int j=0; j<ss.length(); j++){

            if(ss[j]->name()=="waxmpp"){

                if(a->valueAsString("imsi") == Utilities::getImsi()){
                    return true;
                }
            }
         }
     }
    return false;
}
void QmlApplicationViewer::debugAccount(Accounts::AccountId id){

    qDebug()<<"START DEBUG ACCT";
    Accounts::Account *a;
    a = manager->account(id);

    qDebug()<<a->displayName();
    qDebug()<<a->valueAsString("username");

   qDebug()<<"END DEBUG ACCT";

}