aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java/com/libmailcore/IMAPNamespace.java
blob: f590eb6e10f6c4a62467b0cb30d3b5ee6960ab1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.libmailcore;

import java.util.List;

/** IMAP Namespace */
public class IMAPNamespace extends NativeObject {
    /** Returns the prefix of the main namespace item. */
    public native String mainPrefix();
    /** Returns the delimiter of the main namespace item. */
    public native char mainDelimiter();
    
    /** Returns the list of prefixes. */
    public native List<String> prefixes();
    
    /**
     Returns the folder path for the given list of path components in the context
     of the main item of the namespace.
    */
    public native String pathForComponents(List<String> components);
    /**
     Returns the folder path for the given list of path components and a prefix.
     It will use the best item matching the prefix to compute the path.
    */
    public native String pathForComponentsAndPrefix(List<String> components, String prefix);
    
    /** Returns the components given a folder path. */
    public native List<String> componentsFromPath(String path);
    
    /** Returns true if the namespace contains the given folder path. */
    public native boolean containsFolderPath(String path);
    
    /** Returns a namespace (with a single namespace item) with a prefix and a delimiter. */
    public static native IMAPNamespace namespaceWithPrefix(String prefix, char delimiter);
}