[Contents] [Index] [Help] [Browse <] [Browse >]


amarquee.library/QGetOp           amarquee.library/QGetOp

   NAME
    QGetOp - Retrieve a set of entries from the AMarquee server.

   SYNOPSIS
    #include 

    LONG QGetOp(struct QSession * session, char * wildpath, LONG maxBytes)

   FUNCTION
    This function instructs the AMarquee server to retrieve the
    data associated with the given wildpath and download it.
    Once the results are downloaded, they will be sent to your
    process asynchronously as QMessages.
    
   NOTE
    It is sometimes difficult to tell when your QGetOp query
    is complete and you have received all your results from the
    query.  Since each op is processed in order, you can do this
    by sending a QPingOp after the QGetOp, or by specifying
    TRUE for the sendSync argument in the QGo call.  Then when 
    you get the ping packet, you know your query has finished.
    
   INPUTS
    session  - The session to send the get op to.
    wildpath - The path of the data items you wish to retrieve.
               You may include wildcards to retrieve multiple items.
    maxBytes - The maximum number of bytes of data you wish to
               recieve with each item.  Larger data buffers will be
               truncated to this length.  Since data items can be
               arbitrarily large, you can use this to avoid unpleasant
               surprises.  Specifying -1 for this argument will
               allow any size data to be downloaded.

   RESULTS
    Returns the assigned ID number for the get operation on success,
    or 0 on failure.  Data that is retrieved is sent asynchronously,
    as QMessages, to session->qMsgPort.  A QGetOp that does not
    find any matching data items is not considered an error, so it 
    is possible that no messages will be sent in response to this op.

   EXAMPLE
    LONG transID;
    
    /* Get nodes in all clients' home directories named testNode */
    if (transID = QGetOp(session, "/#?/#?/testNode", -1))
       printf("Get op succeeded, was given id #%li\n",transID);
    else 
       printf("Get op failed.  (no memory?)\n");

   AREXX NOTES
    In ARexx, the third argument is optional.  If it is not
    specified, -1 (no size limit) will be assumed.

   AREXX EXAMPLE
    transID = QGetOp(session, '/#?/#?/testNode')
    if (transID = 0) then say "Oops, operation failed"

   SEE ALSO
    QGo, FreeQMessage, QSubscribeOp
    

Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.