amarquee.library/QSetAccessOp amarquee.library/QSetAccessOp
NAME
QSetAccessOp - Set a path describing which other clients may
access your data.
SYNOPSIS
#include
LONG QSetAccessOp(struct QSession * session, char * newAccess)
FUNCTION
By default, any other AMarquee client may download your client's
data. But it may be that you only want to share your data with
certain clients. This function allows you to set an access
control path, in the form of "/hostExp/progExp", to specify
exactly which other AMarquee clients may look at your data.
Clients that are not included in your access path will not
be notified when your data is updated, and they will not see
any data in your directory via QGetOp(), either.
NOTE
While you can hide your data from other clients, you cannot
hide your presence. Unauthorized clients will still be able
to see your root node, and may still be notified when your
session begins or ends.
If you specify an access pattern that excludes your own data(!),
you will not be able to read your data using global node paths
(e.g. QGetOp("/myhost/myprog/mydata") will not return any QMessages
to you), but you can still read your data using local node paths
(e.g. QGetOp("mydata"), which means the same thing, will work).
You can always QSetOp to your directory, no matter what.
INPUTS
session - The session you wish to send the access operation to.
newAccess - The new access pattern to use. Note that on startup,
the access pattern is "/#?/#?" (i.e. no restrictions
on access).
RESULTS
Returns the assigned ID number of the access operation, or 0
to indicate failure. This function will fail and return 0 if
the "newAccess" arg is not in the form "/foo/bar".
EXAMPLE
LONG transID;
/* Let only programs named ExampleProgram see our data */
if (transID = QSetAccessOp(session, "/#?/ExampleProgram"))
printf("SetAccess op succeeded, was given id #%li\n",transID);
else
printf("SetAccess op failed. (no memory?)\n");
AREXX EXAMPLE
transID = QSetAccessOp(session, '#?/ExampleProgram')
if (transID = 0) then say "Oops, transaction failed."
SEE ALSO
SetKeyAccessOp, QGo, QGetOp, QSubscribeOp
Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.