SoftBank Robotics documentation What's new in NAOqi 2.8?

ALUserInfo API

NAOqi Core - Overview | API | Tutorial


Namespace : AL

Method list

This service has the following methods.

class ALUserInfo

Methods

qi::AnyObject ALUserInfo::get(const std::string& dataName)

There are four overloads of this functions:

Gets the value of a data in the user-info domain, about the focused user.

Parameters:
  • dataName – name of the data
Returns:

the value of the data

qi::AnyObject ALUserInfo::get(const int userID, const std::string& dataName) const

Gets the value of a data in the user-info domain about a user given his ID.

Parameters:
  • userID – ID of the user
  • dataName – name of the data
Returns:

value of the data

qi::AnyObject ALUserInfo::get(const std::string& domain, const std::string& dataName) const

Gets the value of a data in the given domain about the focused user.

Parameters:
  • domain – domain of the data
  • dataName – name of the data
Returns:

value of the data

qi::AnyObject ALUserInfo::get(const std::string& domain, const int userID, const std::string& dataName) const

Gets the value of a data in the given domain about a user given his ID.

Parameters:
  • domain – domain of the data
  • userID – ID of the user
  • dataName – name of the data
Returns:

value of the data

bool ALUserInfo::set(const std::string& domain, const std::string& dataName)

Warning

Data can only be of type string, int or bool

There are two overloads of this functions:

Sets the value of a data in the given domain about a the focused user.

Parameters:
  • domain – domain of the data
  • int – ID of the user
  • dataName – name of the data
  • value – value of the data
Returns:

true if the data has successfully been set.

bool ALUserInfo::set(const std::string& domain, const int userID, const std::string& dataName, const qi::AnyValue& value)
Sets the value of a data in the given domain about a the user given his ID.
Parameters:
  • domain – domain of the data
  • int – ID of the user
  • dataName – name of the data
  • value – value of the data
Returns:

true if the data has successfully been set.

void ALUserInfo::has(const std::string& dataName) const

There are four overloads of this functions:

Checks if a data is set in the user-info domain, about the focused user.

Parameters:
  • dataName – name of the data
Returns:

true if the data has a value

bool ALUserInfo::has(const int userID, const std::string& dataName) const
Checks if a data is set in the user-info domain about a user given his ID.
Parameters:
  • userID – ID of the user
  • dataName – name of the data
Returns:

true if the data has a value

bool ALUserInfo::has(const std::string& domain, const std::string& dataName) const

Checks if a data is set in the given domain about the focused user.

Parameters:
  • domain – domain of the data
  • dataName – name of the data
Returns:

true if the data has a value

bool ALUserInfo::has(const std::string& domain, const int userID, const std::string& dataName) const

Checks if a data is set in the given domain about a user given his ID.

Parameters:
  • domain – domain of the data
  • userID – ID of the user
  • dataName – name of the data
Returns:

true if the data has a value

bool ALUserInfo::remove(const std::string& domain, const std::string& dataName)

There are four overloads of this functions:

Removes a data set in the user-info domain, about the focused user.

Parameters:
  • dataName – name of the data
Returns:

true if the data has been successfully removed

bool ALUserInfo::remove(const std::string& domain, const int userID, const std::string& dataName)

Checks if a data is set in the given domain about a user given his ID.

Parameters:
  • domain – domain of the data
  • userID – ID of the user
  • dataName – name of the data
Returns:

true if the data been successfully removed

bool ALUserInfo::removeUser(const std::string& domain)

There are four overloads of this functions:

  • ALUserInfo::removeUser(const std::string& domain)
  • ALUserInfo::removeUser(const std::string& domain, const int userID, const std::string& dataName)

Removes all the data in the given domain about the focused user.

Parameters:
  • domain – domain of the datas
Returns:

true if the data has been successfully removed

bool ALUserInfo::removeUser(const std::string& domain, const int userID, const std::string& dataName)

Removes all the data in the given domain about the focused user.

Parameters:
  • domain – domain of the data
  • userID – ID of the user
  • dataName – name of the data
Returns:

true if the datas been successfully removed

std::string ALUserInfo::getType(const std::string& domain, const std::string& dataName)

Gets the type (string, int or bool) of the data in the given domain.

Parameters:
  • domain – domain of the data
  • dataName – name of the data
Returns:

type of the data

Signals

qi::Signal<int, std::string, qi::AnyObject> ALUserInfo::userInfoEdited

Sent when an information about a user is edited in the user-info domain.

  • int userID: The ID of the users from which a data has been edited.
  • string dataName: The name of the data which has been modified.
  • AL::ALValue dataValue: The new value of the data.
qi::Signal<int, std::string> ALUserInfo::userInfoRemoved

Sent when an information about a user is removed in the user-info domain.

  • int userID: The ID of the users from which a data has been removed.
  • string dataName: The name of the data which has been deleted.