Changeset 1c2e0b3 for perlglue.xs


Ignore:
Timestamp:
Feb 10, 2007, 10:30:11 PM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
272a4a0
Parents:
a1bb198
Message:
Export owl_function_add_message and owl_function_queue_message to perl.
Use them in jabber.pl.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    r30678ae r1c2e0b3  
    129129        }
    130130
     131void add_message(msg)
     132        SV *msg
     133        PREINIT:
     134                owl_message *m;
     135        CODE:
     136        {
     137                if(!SvROK(msg) || SvTYPE(SvRV(msg)) != SVt_PVHV) {
     138                        croak("Usage: owl::add_message($message)");
     139                }
     140
     141                if (owl_global_is_displayoutgoing(&g)) {
     142                        m = owl_perlconfig_hashref2message(msg);
     143                        owl_function_add_message(m);
     144                }
     145        }
     146
     147void admin_message(header, body)
     148        char *header
     149        char *body
     150        PREINIT:
     151                owl_message *m;
     152        CODE:
     153        {
     154                owl_function_adminmsg(header, body);           
     155        }
     156
    131157void start_question(line, callback)
    132158        char *line
Note: See TracChangeset for help on using the changeset viewer.