generic MCP package #354

Parent #355Owner #29Flags readSource hellcore/hellcore.db

Aliases: generic MCP package, package

9 verbs · 14 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
set_version_rangethis none thisrx#3547
dispatchthis none thisrxd#3547
match_requestthis none thisrxd#3549
initialize_connectionthis none thisrxd#3546
message_name_to_verbnamethis none thisrxd#3546
finalize_connectionthis none thisrxd#3542
add_cord_typethis none thisrxd#3548
remove_cord_typethis none thisrxd#3548
send_*this none thisrxd#3547

Properties

PropertyDefinerFlagsOwnerValue
version_range#354r#29{"1.0", "1.0"}
cord_types#354r#29{}
messages_in#355r#29<clear>
messages_out#355r#29<clear>
aliases#1rc#29{"generic MCP package", "package"}
description#1rc#29<clear>
object_size#1r#29{4675, 1298434532}
hidden_verbs#1rc#29<clear>
phelp_msg#1rc#29<clear>
weight#1rc#29<clear>
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #355 generic message dispatch object#1 root

Children: #302 mcp-cord

Call graph

calls n354_0 #354:set_version_range n42_0 #42:controls n354_0->n42_0 n354_1 #354:dispatch n354_4 #354:message_name_to_verbname n354_1->n354_4 n355_1 #355:parse_receive_args n354_1->n355_1 n354_2 #354:match_request n45_2 #45:has_verb n354_2->n45_2 n354_3 #354:initialize_connection n47_16 #47:slice n354_3->n47_16 n354_6 #354:add_cord_type n354_6->n42_0 n354_7 #354:remove_cord_type n354_7->n42_0 n354_8 #354:send_* n355_0 #355:parse_send_args n354_8->n355_0

Source

set_version_range

Spec this none thisFlags rxOwner #29Definer #354

Referenced by

none

Source

1"This is the standard :set_foo verb.  It allows the property to be set if called by this or called with adequate permissions (this's owner or wizardly).";
2if ((caller == this) || $perm_utils:controls(caller_perms(), this))
3return this.(verb[5..length(verb)]) = args[1];
4else
5return E_PERM;
6endif
7"version: 1.0 Fox Wed Jul  5 17:58:13 1995 EDT";

dispatch

Spec this none thisFlags rxdOwner #361Definer #354

Referenced by

none

Source

1"Usage:  :dispatch_request(who, authkey, name, arguments)";
2connection = caller;
3{message, alist} = args;
4if (verbname = this:message_name_to_verbname(message))
5set_task_perms(caller_perms());
6this:(verbname)(connection, @this:parse_receive_args(message, alist));
7endif

match_request

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

none

Source

1"Usage:  :match_request(request)";
2"";
3request = args[1];
4if ($object_utils:has_verb(this, verbname = "mcp_" + request))
5return verbname;
6else
7return 0;
8endif
9"version: 1.0 Fox Wed Jul  5 17:58:14 1995 EDT";

initialize_connection

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

none

Source

1"Usage:  :initialize_connection()";
2"";
3{version} = args;
4connection = caller;
5messages = $list_utils:slice(this.messages_in);
6connection:register_handlers(messages);

message_name_to_verbname

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

Source

1{message} = args;
2if (has_callable_verb(this, vname = "handle_" + message))
3return vname;
4else
5return 0;
6endif

finalize_connection

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

none

Source

1connection = caller;
2return 0;

add_cord_type

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

none

Source

1"Usage:  :add_cord_type(cord_type)";
2"";
3{cord_type} = args;
4if ((caller == this) || $perm_utils:controls(caller_perms(), this))
5return this.cord_types = setadd(this.cord_types, cord_type);
6else
7raise(E_PERM);
8endif

remove_cord_type

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

none

Source

1"Usage:  :remove_cord_type(cord_type)";
2"";
3{cord_type} = args;
4if ((caller == this) || $perm_utils:controls(caller_perms(), this))
5return this.cord_types = setremove(this.cord_types, cord_type);
6else
7raise(E_PERM);
8endif

send_*

Spec this none thisFlags rxdOwner #29Definer #354

Referenced by

none

Source

1{connection, @args} = args;
2if (caller == this)
3message = verb[6..$];
4`connection:send(message, this:parse_send_args(message, @args)) ! E_VERBNF';
5else
6raise(E_PERM);
7endif