Yate
Public Member Functions | Friends

JIDResourceList Class Reference

A resource list. More...

#include <yatejabber.h>

Inheritance diagram for JIDResourceList:
Mutex Lockable

List of all members.

Public Member Functions

 JIDResourceList ()
bool add (const String &name)
bool add (JIDResource *resource)
void remove (JIDResource *resource, bool del=true)
void clear ()
JIDResourceget (const String &name)
JIDResourcegetFirst ()
JIDResourcegetAudio (bool availableOnly=true)

Friends

class XMPPUser
class JBPresence

Detailed Description

A resource list.

This class holds a resource list


Constructor & Destructor Documentation

JIDResourceList ( ) [inline]

Constructor


Member Function Documentation

bool add ( const String name) [inline]

Add a resource to the list if a resource with the given name doesn't exists

Parameters:
nameThe resource name
Returns:
False if the the resource already exists in the list

References JIDResourceList::add().

Referenced by JIDResourceList::add().

bool add ( JIDResource resource)

Add a resource to the list if not already there. Destroy the received resource if not added

Parameters:
resourceThe resource to add
Returns:
False if the the resource already exists in the list
void clear ( ) [inline]

Clear the list

JIDResource* get ( const String name)

Get a resource with the given name

Parameters:
nameThe resource name
Returns:
A pointer to the resource or 0
JIDResource* getAudio ( bool  availableOnly = true)

Get the first resource with audio capability

Parameters:
availableOnlyTrue to get only if available
Returns:
A pointer to the resource or 0
JIDResource* getFirst ( ) [inline]

Get the first resource from the list

Returns:
A pointer to the resource or 0

References ObjList::get(), and ObjList::skipNull().

void remove ( JIDResource resource,
bool  del = true 
) [inline]

Remove a resource from the list

Parameters:
resourceThe resource to remove
delTrue to delete the resource

The documentation for this class was generated from the following file: