public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Pointer to a function forbid!!
       [not found] <E16vjXV-0002Ty-00@smtp.web.de>
@ 2002-04-11 12:59 ` Glover George
  2002-04-12 10:18   ` Sebastian Huber
  0 siblings, 1 reply; 6+ messages in thread
From: Glover George @ 2002-04-11 12:59 UTC (permalink / raw)
  To: sebastian-huber; +Cc: gcc-help

That's fine, I really just didn't know if I could attach code on the
list.
Here's where I'm passing the address of gate.DeviceCallbakEventHandler()
to a function (which is part of the Intel UPnP SDK, I'll put it's
declaration below).  See, I have some code that this works with, but its
pure C.  The funtions were defined before main (I mean at the top of the
file that contains main).  They didn't use the & before the function
(which was just DeviceCallbackEventHandler), but if I don't include the
&, it says it can't find a matching function for int (*) (<paramaters>).
Candidates are int DeviceCallbackEventHandler(<parameters>).

I know there can be pointers to functions, but I'm not understanding why
it won't work here.

Muchas Gracias in advance!!!

Int main (arc, argv**){
Gate gate;
.
.
.
if ((ret = UpnpRegisterRootDevice(desc_doc_url,
&gate.DeviceCallbackEventHandler,
                                &gate.device_handle,
&gate.device_handle)) != UPNP_E_SUCCESS)
        {
		...(SNIP)
        }
.
.
.
}
///////Here is the class declaration for a Gate class.

class Gate
{
        public:
                Gate();
                ~Gate();

                int DeviceStateTableInit(char *);
                int DeviceHandleSubscriptionRequest (struct
Upnp_Subscription_Request *sr_event);
                int DeviceHandleGetVarRequest(struct
Upnp_State_Var_Request *);
                int DeviceHandleActionRequest(struct Upnp_Action_Request
*);
                int DeviceCallbackEventHandler(Upnp_EventType EventType,
void*, void*);

                PortMapList m_list;
                IPCon *m_ipcon;
                char *gate_udn;
                UpnpDevice_Handle device_handle;
};
///////AND THE following is the declaration provide in the Intel UPnP
SDK for Linux


/** {\bf UpnpRegisterRootDevice} registers a device application with
 *  the UPnP API.  A device application cannot make any other API
 *  calls until it registers using this function.  Device applications
 *  can also register as control points (see {\bf UpnpRegisterClient}
 *  to get a control point handle to perform control point
 *  functionality).
 *
 *  {\bf UpnpRegisterRootDevice} is synchronous and does not generate
 *  any callbacks.  Callbacks can occur as soon as this function
returns.
 *
 *  @return An integer representing one of the following:
 *    \begin{itemize}
 *      \item {\tt UPNP_E_SUCCESS}: The operation completed
successfully.
 *      \item {\tt UPNP_E_FINISH}: The UPnP library is already
terminated or
 *                                 is not initialized.
 *      \item {\tt UPNP_E_INVALID_DESC}: The description document was
not
 *              found or it does not contain a valid device description.
 *      \item {\tt UPNP_E_INVALID_PARAM}: Either {\bf Callback} or {\bf
Hnd}
 *              are not valid pointers or {\bf DescURL} is {\tt NULL}.
 *      \item {\tt UPNP_E_NETWORK_ERROR}: A network error occurred.
 *      \item {\tt UPNP_E_SOCKET_WRITE}: An error or timeout occurred
writing
 *              to a socket.
 *      \item {\tt UPNP_E_SOCKET_READ}: An error or timeout occurred
reading
 *              from a socket.
 *      \item {\tt UPNP_E_SOCKET_BIND}: An error occurred binding a
socket.
 *      \item {\tt UPNP_E_SOCKET_CONNECT}: An error occurred connecting
the
 *              socket.
 *      \item {\tt UPNP_E_OUTOF_SOCKET}: Too many sockets are currently
 *              allocated.
 *      \item {\tt UPNP_E_OUTOF_MEMORY}: There are insufficient
resources to
 *              register this root device.
 *    \end{itemize} */

int UpnpRegisterRootDevice(
    IN const char *DescUrl,    /** Pointer to a string containing the
                                   description URL for this root device
                                   instance. */
    IN Upnp_FunPtr Callback,   /** Pointer to the callback function for
                                   receiving asynchronous events. */
    IN const void *Cookie,     /** Pointer to user data returned with
the
                                   callback function when invoked. */
    OUT UpnpDevice_Handle *Hnd /** Pointer to a variable to store the
                                   new device handle. */
    );




> -----Original Message-----
> From: sebastian-huber@web.de [mailto:sebastian-huber@web.de] 
> Sent: Thursday, April 11, 2002 1:42 PM
> To: Glover George
> Subject: Re: Pointer to a function forbid!!
> 
> 
> Hello,
> a bit of code might be helpful.
> 
> On Thursday 11 April 2002 20:31, you wrote:
> > Hi, I was wondering if there is ANYWAY to overcome this 
> error message 
> > with G++;
> >
> > I have to pass a pointer to a function as a parameter to some other 
> > function.  However, the funtion I need to pass is a member 
> function of 
> > a class.  When I do, g++ complains with this.
> >
> > ISO C++ forbids taking the address of a bound member 
> function to form 
> > a pointer to member function.  Cannont convert ..... (snip)
> >
> > What exactly does this mean and why not?  The function is 
> of an object 
> > that has been initialized.  It is local to main however.  
> Is it that 
> > it needs to be created with a new before I can do it or is 
> there just 
> > absolutely no way to pass a pointer to a member function?
> >
> > Thank you.
> >
> > Glover George
> > Systems/Networks Admin
> > Gulf Sales & Supply, Inc.
> > (228) 762-0268
> > dime@gulfsales.com
> > http://www.gulfsales.com
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Pointer to a function forbid!!
  2002-04-11 12:59 ` Pointer to a function forbid!! Glover George
@ 2002-04-12 10:18   ` Sebastian Huber
  0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Huber @ 2002-04-12 10:18 UTC (permalink / raw)
  To: gcc-help

Hello,
if you want to avoid global variables, you can try this:

class A {
public:
	static void f( void* thisPointer)
	{
		static_cast<A*>( thisPointer)->m();
	}

private:
	void m();
};

This works a least with the POSIX thread functions.

On Thursday 11 April 2002 21:32, you wrote:
> That's fine, I really just didn't know if I could attach code on the
> list.
> Here's where I'm passing the address of gate.DeviceCallbakEventHandler()
> to a function (which is part of the Intel UPnP SDK, I'll put it's
> declaration below).  See, I have some code that this works with, but its
> pure C.  The funtions were defined before main (I mean at the top of the
> file that contains main).  They didn't use the & before the function
> (which was just DeviceCallbackEventHandler), but if I don't include the
> &, it says it can't find a matching function for int (*) (<paramaters>).
> Candidates are int DeviceCallbackEventHandler(<parameters>).
>
> I know there can be pointers to functions, but I'm not understanding why
> it won't work here.
>
> Muchas Gracias in advance!!!
>
> Int main (arc, argv**){
> Gate gate;
> .
> .
> .
> if ((ret = UpnpRegisterRootDevice(desc_doc_url,
> &gate.DeviceCallbackEventHandler,
>                                 &gate.device_handle,
> &gate.device_handle)) != UPNP_E_SUCCESS)
>         {
> 		...(SNIP)
>         }
> .
> .
> .
> }
> ///////Here is the class declaration for a Gate class.
>
> class Gate
> {
>         public:
>                 Gate();
>                 ~Gate();
>
>                 int DeviceStateTableInit(char *);
>                 int DeviceHandleSubscriptionRequest (struct
> Upnp_Subscription_Request *sr_event);
>                 int DeviceHandleGetVarRequest(struct
> Upnp_State_Var_Request *);
>                 int DeviceHandleActionRequest(struct Upnp_Action_Request
> *);
>                 int DeviceCallbackEventHandler(Upnp_EventType EventType,
> void*, void*);
>
>                 PortMapList m_list;
>                 IPCon *m_ipcon;
>                 char *gate_udn;
>                 UpnpDevice_Handle device_handle;
> };
> ///////AND THE following is the declaration provide in the Intel UPnP
> SDK for Linux
>
>
> /** {\bf UpnpRegisterRootDevice} registers a device application with
>  *  the UPnP API.  A device application cannot make any other API
>  *  calls until it registers using this function.  Device applications
>  *  can also register as control points (see {\bf UpnpRegisterClient}
>  *  to get a control point handle to perform control point
>  *  functionality).
>  *
>  *  {\bf UpnpRegisterRootDevice} is synchronous and does not generate
>  *  any callbacks.  Callbacks can occur as soon as this function
> returns.
>  *
>  *  @return An integer representing one of the following:
>  *    \begin{itemize}
>  *      \item {\tt UPNP_E_SUCCESS}: The operation completed
> successfully.
>  *      \item {\tt UPNP_E_FINISH}: The UPnP library is already
> terminated or
>  *                                 is not initialized.
>  *      \item {\tt UPNP_E_INVALID_DESC}: The description document was
> not
>  *              found or it does not contain a valid device description.
>  *      \item {\tt UPNP_E_INVALID_PARAM}: Either {\bf Callback} or {\bf
> Hnd}
>  *              are not valid pointers or {\bf DescURL} is {\tt NULL}.
>  *      \item {\tt UPNP_E_NETWORK_ERROR}: A network error occurred.
>  *      \item {\tt UPNP_E_SOCKET_WRITE}: An error or timeout occurred
> writing
>  *              to a socket.
>  *      \item {\tt UPNP_E_SOCKET_READ}: An error or timeout occurred
> reading
>  *              from a socket.
>  *      \item {\tt UPNP_E_SOCKET_BIND}: An error occurred binding a
> socket.
>  *      \item {\tt UPNP_E_SOCKET_CONNECT}: An error occurred connecting
> the
>  *              socket.
>  *      \item {\tt UPNP_E_OUTOF_SOCKET}: Too many sockets are currently
>  *              allocated.
>  *      \item {\tt UPNP_E_OUTOF_MEMORY}: There are insufficient
> resources to
>  *              register this root device.
>  *    \end{itemize} */
>
> int UpnpRegisterRootDevice(
>     IN const char *DescUrl,    /** Pointer to a string containing the
>                                    description URL for this root device
>                                    instance. */
>     IN Upnp_FunPtr Callback,   /** Pointer to the callback function for
>                                    receiving asynchronous events. */
>     IN const void *Cookie,     /** Pointer to user data returned with
> the
>                                    callback function when invoked. */
>     OUT UpnpDevice_Handle *Hnd /** Pointer to a variable to store the
>                                    new device handle. */
>     );
>
> > -----Original Message-----
> > From: sebastian-huber@web.de [mailto:sebastian-huber@web.de]
> > Sent: Thursday, April 11, 2002 1:42 PM
> > To: Glover George
> > Subject: Re: Pointer to a function forbid!!
> >
> >
> > Hello,
> > a bit of code might be helpful.
> >
> > On Thursday 11 April 2002 20:31, you wrote:
> > > Hi, I was wondering if there is ANYWAY to overcome this
> >
> > error message
> >
> > > with G++;
> > >
> > > I have to pass a pointer to a function as a parameter to some other
> > > function.  However, the funtion I need to pass is a member
> >
> > function of
> >
> > > a class.  When I do, g++ complains with this.
> > >
> > > ISO C++ forbids taking the address of a bound member
> >
> > function to form
> >
> > > a pointer to member function.  Cannont convert ..... (snip)
> > >
> > > What exactly does this mean and why not?  The function is
> >
> > of an object
> >
> > > that has been initialized.  It is local to main however.
> >
> > Is it that
> >
> > > it needs to be created with a new before I can do it or is
> >
> > there just
> >
> > > absolutely no way to pass a pointer to a member function?
> > >
> > > Thank you.
> > >
> > > Glover George
> > > Systems/Networks Admin
> > > Gulf Sales & Supply, Inc.
> > > (228) 762-0268
> > > dime@gulfsales.com
> > > http://www.gulfsales.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Pointer to a function forbid!!
  2002-04-12 15:15 ` Glover George
@ 2002-04-13 18:00   ` Sebastian Huber
  0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Huber @ 2002-04-13 18:00 UTC (permalink / raw)
  To: gcc-help

Hello,
you take the pointer of the A::f() function, this functions calls then your 
member function via the handed over this pointer. This approach works only if 
the code that calls the funktion via the pointer passes an arbitrary object 
via a void pointer to the function, in our special case the this pointer.
The declaration of such functions is should be similar to void* (*f)(void*), 
at least for a function executed in a POSIX thread. I don't know if your 
handler functions works the same way. If not you have to use a globel object 
and a wraper function.

On Friday 12 April 2002 19:18, you wrote:
> Thank you, but could you explain something to me ?  Is f the name of the
> function I'm needing a pointer to, or is it ADDED to the class?  I'm not
> quite sure how I use this.  Is m() the member function that I'm needing
> the pointer to? I know I replace the A with the name of my class, but
> I'm not sure which other items I'm supposed to substitute for.  Thanks a
> lot man.
>
> > -----Original Message-----
> > From: sebastian-huber@web.de [mailto:sebastian-huber@web.de]
> > Sent: Friday, April 12, 2002 11:59 AM
> > To: Glover George
> > Subject: Re: Pointer to a function forbid!!
> >
> >
> > Hello,
> > if you want to avoid global variables, you can try this:
> >
> > class A {
> > public:
> > 	static void f( void* thisPointer)
> > 	{
> > 		static_cast<A*>( thisPointer)->m();
> > 	}
> >
> > private:
> > 	void m();
> > };
> >
> > This works a least with the POSIX thread functions.
> >
> > [...]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Pointer to a function forbid!!
       [not found] <E16w4Nu-0002jV-00@smtp.web.de>
@ 2002-04-12 15:15 ` Glover George
  2002-04-13 18:00   ` Sebastian Huber
  0 siblings, 1 reply; 6+ messages in thread
From: Glover George @ 2002-04-12 15:15 UTC (permalink / raw)
  To: gcc-help

Thank you, but could you explain something to me ?  Is f the name of the
function I'm needing a pointer to, or is it ADDED to the class?  I'm not
quite sure how I use this.  Is m() the member function that I'm needing
the pointer to? I know I replace the A with the name of my class, but
I'm not sure which other items I'm supposed to substitute for.  Thanks a
lot man.




> -----Original Message-----
> From: sebastian-huber@web.de [mailto:sebastian-huber@web.de] 
> Sent: Friday, April 12, 2002 11:59 AM
> To: Glover George
> Subject: Re: Pointer to a function forbid!!
> 
> 
> Hello,
> if you want to avoid global variables, you can try this:
> 
> class A {
> public:
> 	static void f( void* thisPointer)
> 	{
> 		static_cast<A*>( thisPointer)->m();
> 	}
> 
> private:
> 	void m();
> };
> 
> This works a least with the POSIX thread functions.
> 
> On Thursday 11 April 2002 21:32, you wrote:
> > That's fine, I really just didn't know if I could attach 
> code on the 
> > list. Here's where I'm passing the address of 
> > gate.DeviceCallbakEventHandler() to a function (which is 
> part of the 
> > Intel UPnP SDK, I'll put it's declaration below).  See, I have some 
> > code that this works with, but its pure C.  The funtions 
> were defined 
> > before main (I mean at the top of the file that contains 
> main).  They 
> > didn't use the & before the function (which was just 
> > DeviceCallbackEventHandler), but if I don't include the &, 
> it says it 
> > can't find a matching function for int (*) (<paramaters>). 
> Candidates 
> > are int DeviceCallbackEventHandler(<parameters>).
> >
> > I know there can be pointers to functions, but I'm not 
> understanding 
> > why it won't work here.
> >
> > Muchas Gracias in advance!!!
> >
> > Int main (arc, argv**){
> > Gate gate;
> > .
> > .
> > .
> > if ((ret = UpnpRegisterRootDevice(desc_doc_url,
> > &gate.DeviceCallbackEventHandler,
> >                                 &gate.device_handle,
> > &gate.device_handle)) != UPNP_E_SUCCESS)
> >         {
> > 		...(SNIP)
> >         }
> > .
> > .
> > .
> > }
> > ///////Here is the class declaration for a Gate class.
> >
> > class Gate
> > {
> >         public:
> >                 Gate();
> >                 ~Gate();
> >
> >                 int DeviceStateTableInit(char *);
> >                 int DeviceHandleSubscriptionRequest (struct 
> > Upnp_Subscription_Request *sr_event);
> >                 int DeviceHandleGetVarRequest(struct 
> > Upnp_State_Var_Request *);
> >                 int DeviceHandleActionRequest(struct 
> > Upnp_Action_Request *);
> >                 int DeviceCallbackEventHandler(Upnp_EventType 
> > EventType, void*, void*);
> >
> >                 PortMapList m_list;
> >                 IPCon *m_ipcon;
> >                 char *gate_udn;
> >                 UpnpDevice_Handle device_handle;
> > };
> > ///////AND THE following is the declaration provide in the 
> Intel UPnP 
> > SDK for Linux
> >
> >
> > /** {\bf UpnpRegisterRootDevice} registers a device application with
> >  *  the UPnP API.  A device application cannot make any other API
> >  *  calls until it registers using this function.  Device 
> applications
> >  *  can also register as control points (see {\bf 
> UpnpRegisterClient}
> >  *  to get a control point handle to perform control point
> >  *  functionality).
> >  *
> >  *  {\bf UpnpRegisterRootDevice} is synchronous and does 
> not generate
> >  *  any callbacks.  Callbacks can occur as soon as this function 
> > returns.
> >  *
> >  *  @return An integer representing one of the following:
> >  *    \begin{itemize}
> >  *      \item {\tt UPNP_E_SUCCESS}: The operation completed
> > successfully.
> >  *      \item {\tt UPNP_E_FINISH}: The UPnP library is already
> > terminated or
> >  *                                 is not initialized.
> >  *      \item {\tt UPNP_E_INVALID_DESC}: The description 
> document was
> > not
> >  *              found or it does not contain a valid device 
> description.
> >  *      \item {\tt UPNP_E_INVALID_PARAM}: Either {\bf 
> Callback} or {\bf
> > Hnd}
> >  *              are not valid pointers or {\bf DescURL} is 
> {\tt NULL}.
> >  *      \item {\tt UPNP_E_NETWORK_ERROR}: A network error occurred.
> >  *      \item {\tt UPNP_E_SOCKET_WRITE}: An error or 
> timeout occurred
> > writing
> >  *              to a socket.
> >  *      \item {\tt UPNP_E_SOCKET_READ}: An error or timeout occurred
> > reading
> >  *              from a socket.
> >  *      \item {\tt UPNP_E_SOCKET_BIND}: An error occurred binding a
> > socket.
> >  *      \item {\tt UPNP_E_SOCKET_CONNECT}: An error 
> occurred connecting
> > the
> >  *              socket.
> >  *      \item {\tt UPNP_E_OUTOF_SOCKET}: Too many sockets 
> are currently
> >  *              allocated.
> >  *      \item {\tt UPNP_E_OUTOF_MEMORY}: There are insufficient
> > resources to
> >  *              register this root device.
> >  *    \end{itemize} */
> >
> > int UpnpRegisterRootDevice(
> >     IN const char *DescUrl,    /** Pointer to a string 
> containing the
> >                                    description URL for this 
> root device
> >                                    instance. */
> >     IN Upnp_FunPtr Callback,   /** Pointer to the callback 
> function for
> >                                    receiving asynchronous events. */
> >     IN const void *Cookie,     /** Pointer to user data 
> returned with
> > the
> >                                    callback function when 
> invoked. */
> >     OUT UpnpDevice_Handle *Hnd /** Pointer to a variable to 
> store the
> >                                    new device handle. */
> >     );
> >
> > > -----Original Message-----
> > > From: sebastian-huber@web.de [mailto:sebastian-huber@web.de]
> > > Sent: Thursday, April 11, 2002 1:42 PM
> > > To: Glover George
> > > Subject: Re: Pointer to a function forbid!!
> > >
> > >
> > > Hello,
> > > a bit of code might be helpful.
> > >
> > > On Thursday 11 April 2002 20:31, you wrote:
> > > > Hi, I was wondering if there is ANYWAY to overcome this
> > >
> > > error message
> > >
> > > > with G++;
> > > >
> > > > I have to pass a pointer to a function as a parameter to some 
> > > > other function.  However, the funtion I need to pass is a member
> > >
> > > function of
> > >
> > > > a class.  When I do, g++ complains with this.
> > > >
> > > > ISO C++ forbids taking the address of a bound member
> > >
> > > function to form
> > >
> > > > a pointer to member function.  Cannont convert ..... (snip)
> > > >
> > > > What exactly does this mean and why not?  The function is
> > >
> > > of an object
> > >
> > > > that has been initialized.  It is local to main however.
> > >
> > > Is it that
> > >
> > > > it needs to be created with a new before I can do it or is
> > >
> > > there just
> > >
> > > > absolutely no way to pass a pointer to a member function?
> > > >
> > > > Thank you.
> > > >
> > > > Glover George
> > > > Systems/Networks Admin
> > > > Gulf Sales & Supply, Inc.
> > > > (228) 762-0268
> > > > dime@gulfsales.com
> > > > http://www.gulfsales.com
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Pointer to a function forbid!!
       [not found] <616BE6A276E3714788D2AC35C40CD18D5B1F89@whale.softwire.co.uk>
@ 2002-04-12  5:56 ` Rupert Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Rupert Wood @ 2002-04-12  5:56 UTC (permalink / raw)
  To: 'Glover George'; +Cc: gcc-help

Glover George wrote:

> Here's where I'm passing the address of
> gate.DeviceCallbakEventHandler() to a function (which is part of the
> Intel UPnP SDK, I'll put it's declaration below).
:
> I know there can be pointers to functions, but I'm not understanding
> why it won't work here.

Because it's a non-static class member function.

Non-static member functions expect to be passed (behind the scenes) the
address of the object that they were invoked on. They need this to use
as the value of their 'this' pointer. The language doesn't support
'binding' a function pointer and an object pointer together to use as a
pointer to that operation on that object.

If the function must be a member of Gate, and Gate has scope in main()
then you could give the Gate global scope and create a trivial wrapper
function also at global scope:

    int GateDeviceCallbackEventHandler(args)
    {
        return gate.DeviceCallbackEventHandler(args);
    }

I don't really like the idea of that from a 'cleanliness' viewpoint, but
if it must refer to a specific instance of a gate object then that's
probably the best way.

Rup.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Pointer to a function forbid!!
@ 2002-04-11 11:32 Glover George
  0 siblings, 0 replies; 6+ messages in thread
From: Glover George @ 2002-04-11 11:32 UTC (permalink / raw)
  To: gcc-help

Hi, I was wondering if there is ANYWAY to overcome this error message
with G++;

I have to pass a pointer to a function as a parameter to some other
function.  However, the funtion I need to pass is a member function of a
class.  When I do, g++ complains with this.

ISO C++ forbids taking the address of a bound member function to form a
pointer to member function.
 Cannont convert ..... (snip)

What exactly does this mean and why not?  The function is of an object
that has been initialized.  It is local to main however.  Is it that it
needs to be created with a new before I can do it or is there just
absolutely no way to pass a pointer to a member function?

Thank you.

Glover George
Systems/Networks Admin
Gulf Sales & Supply, Inc.
(228) 762-0268
dime@gulfsales.com
http://www.gulfsales.com
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-04-13 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E16vjXV-0002Ty-00@smtp.web.de>
2002-04-11 12:59 ` Pointer to a function forbid!! Glover George
2002-04-12 10:18   ` Sebastian Huber
     [not found] <E16w4Nu-0002jV-00@smtp.web.de>
2002-04-12 15:15 ` Glover George
2002-04-13 18:00   ` Sebastian Huber
     [not found] <616BE6A276E3714788D2AC35C40CD18D5B1F89@whale.softwire.co.uk>
2002-04-12  5:56 ` Rupert Wood
2002-04-11 11:32 Glover George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).