SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::FindUsersRequest Class Reference

Retrieves a list of users from the server which match the specified criteria. More...

#include <FindUsersRequest.h>

Inheritance diagram for sfs3::requests::FindUsersRequest:
[legend]

Public Member Functions

 FindUsersRequest (entities::match::MatchExpression expr, int16_t limit=0)
 Creates a new FindUsersRequest searching the whole Zone.
 FindUsersRequest (entities::match::MatchExpression expr, const entities::Room &room, int16_t limit=0)
 Creates a new FindUsersRequest searching a single Room.
 FindUsersRequest (entities::match::MatchExpression expr, std::string groupId, int16_t limit=0)
 Creates a new FindUsersRequest searching a Room Group.

Detailed Description

Retrieves a list of users from the server which match the specified criteria.

By providing a matching expression and a search scope (a Room, a Group or the entire Zone), SmartFoxServer can find those users matching the passed criteria and return them by means of the userFindResult event.

The users carried by that event are detached snapshots: they are not added to the local user list and are not managed by the UserManager, so they must be treated as read-only search results. The only exception is the requester himself, who is returned as the live SmartFox::getMySelf instance.

See also
entities::match::MatchExpression
event::SFSEvent::USER_FIND_RESULT

Constructor & Destructor Documentation

◆ FindUsersRequest() [1/3]

sfs3::requests::FindUsersRequest::FindUsersRequest ( entities::match::MatchExpression expr,
int16_t limit = 0 )
inline

Creates a new FindUsersRequest searching the whole Zone.

Pass it to SmartFox::send for the request to be performed.

Parameters
exprA matching expression that the system will use to retrieve the users.
limitThe maximum size of the list of users that will be returned by the userFindResult event. If 0, the Zone's own limit is applied.
See also
SmartFox::send
event::SFSEvent::USER_FIND_RESULT

◆ FindUsersRequest() [2/3]

sfs3::requests::FindUsersRequest::FindUsersRequest ( entities::match::MatchExpression expr,
const entities::Room & room,
int16_t limit = 0 )
inline

Creates a new FindUsersRequest searching a single Room.

Parameters
exprA matching expression that the system will use to retrieve the users.
roomThe Room where to search for matching users.
limitThe maximum size of the list of users that will be returned by the userFindResult event. If 0, the Zone's own limit is applied.
See also
FindUsersRequest::FindUsersRequest(entities::match::MatchExpression, int16_t)

◆ FindUsersRequest() [3/3]

sfs3::requests::FindUsersRequest::FindUsersRequest ( entities::match::MatchExpression expr,
std::string groupId,
int16_t limit = 0 )
inline

Creates a new FindUsersRequest searching a Room Group.

Parameters
exprA matching expression that the system will use to retrieve the users.
groupIdThe name of the Group where to search for matching users; the Group must be public.
limitThe maximum size of the list of users that will be returned by the userFindResult event. If 0, the Zone's own limit is applied.
See also
FindUsersRequest::FindUsersRequest(entities::match::MatchExpression, int16_t)

The documentation for this class was generated from the following files:
  • requests/FindUsersRequest.h
  • requests/FindUsersRequest.cpp