aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector/IConnector.java
blob: 07ae43e8072c2b0fb8805af9999cd7d038b25b74 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package cgeo.geocaching.connector;

import cgeo.geocaching.cgBase;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgSearch;
import cgeo.geocaching.cgeoapplication;

import java.util.UUID;

public interface IConnector {
    /**
     * get name for display (currently only used in links)
     * 
     * @return
     */
    public String getName();

    /**
     * return true, if this connector is responsible for the given cache
     * 
     * @param geocode
     * @return
     */
    public boolean canHandle(final String geocode);

    public boolean supportsRefreshCache(final cgCache cache);

    /**
     * get browser URL for the given cache
     * 
     * @param cache
     * @return
     */
    public String getCacheUrl(final cgCache cache);

    /**
     * enable/disable watchlist controls in cache details
     * 
     * @return
     */
    public boolean supportsWatchList();

    /**
     * enable/disable logging controls in cache details
     * 
     * @return
     */
    public boolean supportsLogging();

    /**
     * get host name of the connector server for dynamic loading of data
     * 
     * @return
     */
    public String getHost();

    /**
     * get cache data license text
     * 
     * @param cache
     * @return
     */
    public String getLicenseText(final cgCache cache);

    /**
     * enable/disable user actions in cache details
     * 
     * @return
     */
    public boolean supportsUserActions();

    /**
     * enable/disable "caches around" action in cache details
     * 
     * @return
     */
    public boolean supportsCachesAround();

    public UUID searchByGeocode(final cgBase base, final String geocode, final String guid, final cgeoapplication app, final cgSearch search, final int reason);
}