Communi 1.0.0
A cross-platform IRC client library written with Qt 4
Public Member Functions
IrcSender Class Reference

The IrcSender class is a helper class for handling IRC message sender prefixes. More...

#include <IrcSender>

List of all members.

Public Member Functions

 IrcSender (const QString &prefix=QString())
QString host () const
bool isValid () const
QString name () const
QString prefix () const
void setHost (const QString &host)
void setName (const QString &name)
void setPrefix (const QString &prefix)
void setUser (const QString &user)
QString user () const

Detailed Description

The IrcSender class is a helper class for handling IRC message sender prefixes.

An IRC message sender prefix as specified in RFC 1459:

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    

Constructor & Destructor Documentation

IrcSender::IrcSender ( const QString prefix = QString())

Constructs a new IrcSender, optionally initializing to prefix.


Member Function Documentation

QString IrcSender::host ( ) const [inline]

Returns the host.

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    
bool IrcSender::isValid ( ) const

Returns true if the sender is valid; otherwise false.

A sender is considered valid if the name is not empty.

QString IrcSender::name ( ) const [inline]

Returns the name.

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    
QString IrcSender::prefix ( ) const

Returns the whole prefix.

void IrcSender::setHost ( const QString host) [inline]

Sets the host.

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    
void IrcSender::setName ( const QString name) [inline]

Sets the name.

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    
void IrcSender::setPrefix ( const QString prefix)

Sets the whole prefix.

Warning:
Overrides any existing name, user or host.
void IrcSender::setUser ( const QString user) [inline]

Sets the user.

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    
QString IrcSender::user ( ) const [inline]

Returns the user.

    <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
    

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Defines