|
BIRNET Interface Reference
/opt/src/beast/birnet/birnetmsg.hh
DESCRIPTION
Birnet::Msg | | /opt/src/beast/birnet/birnetmsg.hh:26 |
class Birnet::Msg
{
const Part &empty_part;
int n_msg_types;
uint8*volatile msg_type_bits;
| Type
| register_type
| (ident, default_ouput, label); |
| Type
| lookup_type
| (ident); |
| const char*
| type_ident
| (mtype); |
| const char*
| type_label
| (mtype); |
| uint32
| type_flags
| (mtype); |
| bool
| check
| (mtype); |
| void
| enable
| (mtype); |
| void
| disable
| (mtype); |
| void
| configure
| (mtype, log_mask, logfile); |
| void
| allow_msgs
| (key); |
| void
| deny_msgs
| (key); |
| void
| configure_stdlog
| (redirect_stdlog_to_stderr, stdlog_filename, syslog_priority); |
| void
| display
| (message_type, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); |
| void
| display
| (message_type, format, ...); |
| void
| set_thread_handler
| (handler); |
| void
| default_handler
| (domain, mtype, parts); |
| void
| display_parts
| (domain, message_type, parts); |
| void
| display_aparts
| (log_domain, message_type, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); |
| void
| display_vmsg
| (log_domain, message_type, format, args); |
|
| BIRNET_PRIVATE_CLASS_COPY
| (); |
| void
| init_standard_types
| (); |
| void
| key_list_change_L
| (keylist, isenabled); |
| void
| set_msg_type_L
| (mtype, flags, enabled); |
}; |
|
|
Register a new message type with identifier ident and user digestible
name label. If this function is called multiple times with the same
identifier, the type id acquired by the first call will be returned
and the other arguments are ignored.
As long as the new message type isn't configured individually via
msg_enable(), allow_msgs() or their complements, it shares
the configuration of default_ouput. If NONE or ALWAYS is passed as
default_ouput, this corresponds to the first two message types which
are unconfigrable and always have their output disabled or enabled respectively.
As an exception to the rest of the message API, this function may be
called before birnet_init(). However note, that MT-safety is only ensured
for calls occouring after birnet_init().
This function is MT-safe and may be called from any thread.
| ident: | | message identifier
|
| default_ouput: | | an existing SfiMsgType
|
| label: | | a translated version of ident
|
| RETURNS: | | message type id |
|
Find the message type correspondign to ident. If no message
type was found NONE is returned.
This function is MT-safe and may be called from any thread.
| ident: | | message identifier, e.g. "error", "warning", "info", etc...
|
| RETURNS: | | corresponding Type or 0 |
|
Retrive the string identifying the message type type. For invalid
(non registered) message types, "" is returned.
This function is MT-safe and may be called from any thread.
| type: | | message type, e.g. Msg::ERROR, Msg::WARNING, Msg::INFO, etc...
|
| RETURNS: | | translated message identifier or NULL |
|
Retrive the label identifying the message type type. Usually,
this is a translated version of Msg::type_ident() or ""
if non was registered with the message type.
This function is MT-safe and may be called from any thread.
| type: | | message type, e.g. Msg::ERROR, Msg::WARNING, Msg::INFO, etc...
|
| RETURNS: | | translated message identifier or NULL |
|
| void
| display
| (Type message_type,
const Part &p0,
const Part &p1,
const Part &p2,
const Part &p3,
const Part &p4,
const Part &p5,
const Part &p6,
const Part &p7,
const Part &p8,
const Part &p9); |
Set the handler function for messages logged in the current
thread. If NULL is specified as handler, the standard handler
will be used. For handler implementations that require an extra
data argument, see Thread::set_data().
This function is MT-safe and may be called from any thread.
| handler: | | a valid Msg::Handler or NULL |
|
This is the standard message handler, it produces message
in a prominent way on stderr.
This function is MT-safe and may be called from any thread.
| domain: | | message domain
|
| parts: | | message parts |
|
| void
| display_aparts
| (const char *log_domain,
Type message_type,
const Part &p0,
const Part &p1,
const Part &p2,
const Part &p3,
const Part &p4,
const Part &p5,
const Part &p6,
const Part &p7,
const Part &p8,
const Part &p9); |
|
Birnet::Msg::Check | | /opt/src/beast/birnet/birnetmsg.hh:140 |
Birnet::Msg::Custom | | /opt/src/beast/birnet/birnetmsg.hh:144 |
Birnet::Msg::CustomType | | /opt/src/beast/birnet/birnetmsg.hh:148 |
Birnet::Msg::Part | | /opt/src/beast/birnet/birnetmsg.hh:78 |
Birnet::Msg::Text0 | | /opt/src/beast/birnet/birnetmsg.hh:124 |
Birnet::Msg::Text1 | | /opt/src/beast/birnet/birnetmsg.hh:128 |
Birnet::Msg::Text2 | | /opt/src/beast/birnet/birnetmsg.hh:132 |
Birnet::Msg::Text3 | | /opt/src/beast/birnet/birnetmsg.hh:136 |
|
|