# Irc::Buffer Class Reference

The Irc::Buffer class provides an IRC buffer. More...

`#include <ircbuffer.h>`

List of all members.

## Public Types
enum | MessageFlag { NoFlags = 0x0, IdentifiedFlag = 0x1, EchoFlag = 0x2 }
## Public Slots
bool | message (const QString &message)
bool | notice (const QString &notice)
bool | ctcpAction (const QString &action)
## Signals
void | receiverChanged (const QString &receiver)
void | motdReceived (const QString &motd)
void | joined (const QString &origin)
void | parted (const QString &origin, const QString &message)
void | quit (const QString &origin, const QString &message)
void | nickChanged (const QString &origin, const QString &nick)
void | modeChanged (const QString &origin, const QString &mode, const QString &args)
void | topicChanged (const QString &origin, const QString &topic)
void | invited (const QString &origin, const QString &receiver, const QString &channel)
void | kicked (const QString &origin, const QString &nick, const QString &message)
void | messageReceived (const QString &origin, const QString &message, Irc::Buffer::MessageFlags flags=Irc::Buffer::NoFlags)
void | noticeReceived (const QString &origin, const QString &notice, Irc::Buffer::MessageFlags flags=Irc::Buffer::NoFlags)
void | ctcpRequestReceived (const QString &origin, const QString &request, Irc::Buffer::MessageFlags flags=Irc::Buffer::NoFlags)
void | ctcpReplyReceived (const QString &origin, const QString &reply, Irc::Buffer::MessageFlags flags=Irc::Buffer::NoFlags)
void | ctcpActionReceived (const QString &origin, const QString &action, Irc::Buffer::MessageFlags flags=Irc::Buffer::NoFlags)
void | numericMessageReceived (const QString &origin, uint code, const QStringList &params)
void | unknownMessageReceived (const QString &origin, const QStringList &params)
## Public Member Functions
| ~Buffer ()
Session * | session () const
QString | receiver () const
QString | topic () const
QStringList | names () const
QString | modes (const QString &name) const
QString | visualMode (const QString &name) const
## Protected Member Functions
| Buffer (const QString &receiver, Session *parent=0)

## Detailed Description

The Irc::Buffer class acts as a buffer for a single receiver. Receivers can be:

- the server
- channels
- queries.

Server/channel/query specific messages are delivered to the corresponding buffer.

Note:
  Buffers are not intended to be instantiated directly, but via the virtual factory method Irc::Session::createBuffer().

## Member Enumeration Documentation

enum Irc::Buffer::MessageFlag

This enum describes available message flags.

Enumerator:

  NoFlags | No flags for the message.
  IdentifiedFlag | Message was sent from an identified nick.
  EchoFlag | Message echoed back from library.

## Constructor & Destructor Documentation

Irc::Buffer::~Buffer | ( |  | ) |

Destructs the IRC buffer.

Irc::Buffer::Buffer | ( | const QString & | receiver,
|  | Session * | parent = `0` |
| ) |  |  | `[protected]`

Constructs a new IRC buffer with receiver and parent.

See also:
  Session::createBuffer()

## Member Function Documentation

bool Irc::Buffer::ctcpAction | ( | const QString & | action | ) | `[slot]`

This convenience function sends a CTCP action to the buffers' receiver.

See also:
  Session::ctcpAction()

void Irc::Buffer::ctcpActionReceived | ( | const QString & | origin,
|  | const QString & | action,
|  | Irc::Buffer::MessageFlags | flags = `Irc::Buffer::NoFlags` |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent a CTCP action.

void Irc::Buffer::ctcpReplyReceived | ( | const QString & | origin,
|  | const QString & | reply,
|  | Irc::Buffer::MessageFlags | flags = `Irc::Buffer::NoFlags` |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent a CTCP reply.

void Irc::Buffer::ctcpRequestReceived | ( | const QString & | origin,
|  | const QString & | request,
|  | Irc::Buffer::MessageFlags | flags = `Irc::Buffer::NoFlags` |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent a CTCP request.

void Irc::Buffer::invited | ( | const QString & | origin,
|  | const QString & | receiver,
|  | const QString & | channel |
| ) |  |  | `[signal]`

This signal is emitted when origin has invited receiver to channel.

void Irc::Buffer::joined | ( | const QString & | origin | ) | `[signal]`

This signal is emitted when origin has joined.

void Irc::Buffer::kicked | ( | const QString & | origin,
|  | const QString & | nick,
|  | const QString & | message |
| ) |  |  | `[signal]`

This signal is emitted when origin has kicked nick with message.

bool Irc::Buffer::message | ( | const QString & | message | ) | `[slot]`

This convenience function sends a message to the buffer's receiver.

See also:
  Session::message()

void Irc::Buffer::messageReceived | ( | const QString & | origin,
|  | const QString & | message,
|  | Irc::Buffer::MessageFlags | flags = `Irc::Buffer::NoFlags` |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent message.

void Irc::Buffer::modeChanged | ( | const QString & | origin,
|  | const QString & | mode,
|  | const QString & | args |
| ) |  |  | `[signal]`

This signal is emitted when origin has changed mode with args.

QString Irc::Buffer::modes | ( | const QString & | name | ) | const

Returns the modes of name.

void Irc::Buffer::motdReceived | ( | const QString & | motd | ) | `[signal]`

This signal is emitted when message of the day motd has been received.

QStringList Irc::Buffer::names | ( |  | ) | const

Returns the names.

void Irc::Buffer::nickChanged | ( | const QString & | origin,
|  | const QString & | nick |
| ) |  |  | `[signal]`

This signal is emitted when origin has changed nick.

bool Irc::Buffer::notice | ( | const QString & | notice | ) | `[slot]`

This convenience function sends a notice to the buffer's receiver.

See also:
  Session::notice()

void Irc::Buffer::noticeReceived | ( | const QString & | origin,
|  | const QString & | notice,
|  | Irc::Buffer::MessageFlags | flags = `Irc::Buffer::NoFlags` |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent notice.

void Irc::Buffer::numericMessageReceived | ( | const QString & | origin,
|  | uint | code,
|  | const QStringList & | params |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent a numeric message with code and params.

void Irc::Buffer::parted | ( | const QString & | origin,
|  | const QString & | message |
| ) |  |  | `[signal]`

This signal is emitted when origin has parted with message.

void Irc::Buffer::quit | ( | const QString & | origin,
|  | const QString & | message |
| ) |  |  | `[signal]`

This signal is emitted when origin has quit with message.

QString Irc::Buffer::receiver | ( |  | ) | const

Returns the receiver.

void Irc::Buffer::receiverChanged | ( | const QString & | receiver | ) | `[signal]`

This signal is emitted whenever receiver has changed.

Session * Irc::Buffer::session | ( |  | ) | const

Returns the session.

QString Irc::Buffer::topic | ( |  | ) | const

Returns the topic.

void Irc::Buffer::topicChanged | ( | const QString & | origin,
|  | const QString & | topic |
| ) |  |  | `[signal]`

This signal is emitted when origin has changed topic.

void Irc::Buffer::unknownMessageReceived | ( | const QString & | origin,
|  | const QStringList & | params |
| ) |  |  | `[signal]`

This signal is emitted when origin has sent an unknown message with params.

QString Irc::Buffer::visualMode | ( | const QString & | name | ) | const

Returns the visual mode of name.

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

- include/ircbuffer.h
- src/ircbuffer.cpp