[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancement of ticket_t API.

From: Alain Magloire
Subject: Re: Enhancement of ticket_t API.
Date: Sat, 17 Nov 2001 17:22:22 -0500 (EST)

> Ok, I tried to integrate it.
> However, what would make me blissful is to be able to do:

The wicket_to_ticket you've ask for:

int wicket_to_ticket (wicket wicket, ticket_t *ticket)
        return wicket_get_ticket (wicket, ticket, NULL, NULL);

2) You should be able to set a stream_t to a message_t
  and it will be parse when you access the fields.

   message_t mesg = NULL;
   header_t header = NULL;
   stream_t stream = NULL;
   char buffer[512];
   off_t off = 0;
   size_t n = 0;

   message_create (&mesg, NULL);
   file_stream_create (&stream);
   stream_open (stream, "/home/alain/mesg_1", 0, MU_STREAM_READ);
   message_set_stream (mesg, stream, NULL);
   message_get_header (mesg, &header);

   stream = NULL;
   header_get_stream (header, &stream);
   while (stream_readline (stream, buffer, sizeof buffer, off, &n) == 0
          && n > 0) {
     printf ("%s", buffer);
     off += n;
   message_destroy (&mesg, NULL);

Let me know 'cause, I'm pretty sure that
I broke things 8-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]