On Thu, Dec 31, 2009 at 3:53 PM, dDong Y. <[email protected]> wrote:
>
> And i try to format it like this(it's a pity that i'm not very good at
> english):
>
> when i fomatted a NAMESPACE command in client APP using :
> space = (NAMESPACE**) mail_parameters(stream,GET_NAMESPACE,NIL);
>
> i noted that the server responsed :
> * NAMESPACE (("" "/")("#mhinbox" NIL)("#mh/" "/")) (("~" "/")) (("#shared/"
> "/")("#ftp/" "/")("#news." ".")("#public/" "/"))
>
> but when i debug client app and look for stack info,i found var *space only
> got attirbute "#shared/" with nothing else. how is it going?
>
>
OK, I am not very familiar with namespaces, but looking at the c-client
code, I can see that the expected result of the GET_NAMESPACE is a NAMESPACE
array (a NAMESPACE **). And the definition of a NAMESPACE appears to be:
#define NAMESPACE struct mail_namespace
NAMESPACE {
char *name; /* name of this namespace */
int delimiter; /* hierarchy delimiter */
PARAMETER *param; /* namespace parameters */
NAMESPACE *next; /* next namespace */
};
So your 'space' variable needs to be traversed accordingly. You should be
able to get the namespaces with something like this:
NAMESPACE *p;
for (p=space; p; p = p->next) {
printf("name=%s delim=%d\n", p->name, p->delimiter);
}
Or are you saying that you are only getting one entry in the NAMESPACE
array?
The other questions, I cannot help you with, sorry.
Robby
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw