Beispiel #1
0
MERROR
UsersManager::
MyUserGraph::
getInUsers(size_t userId, android::Vector<android::sp<MyUser> >& result) const
{
    result.clear();
    UserNode const& usr = mUserVector.valueFor(userId);
    for (size_t i = 0; i < usr.mIn.size(); i++)
    {
        result.add(mUserVector.valueFor(usr.mIn.itemAt(i)).mMyUser);
    }
    return OK;
}
Beispiel #2
0
MERROR
UsersManager::
MyUserGraph::
getPriorUsers(size_t userId, android::Vector<android::sp<MyUser> >& result) const
{
    result.clear();
    //
    //It also contains the current user.
    if(0 > DFS(userId, result))
    {
        return UNKNOWN_ERROR;
    }
    return OK;
}