Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BookmarkSharingResult.java « data « bookmarks « maps « mapswithme « com « src « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a0d7a81a574c564a9de49d41700997bc73f32b57 (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
package com.mapswithme.maps.bookmarks.data;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public class BookmarkSharingResult
{
  @Retention(RetentionPolicy.SOURCE)
  @IntDef({ SUCCESS, EMPTY_CATEGORY, ARCHIVE_ERROR, FILE_ERROR })
  public @interface Code {}

  public static final int SUCCESS = 0;
  public static final int EMPTY_CATEGORY = 1;
  public static final int ARCHIVE_ERROR = 2;
  public static final int FILE_ERROR = 3;

  private final long mCategoryId;
  @Code
  private final int mCode;
  @NonNull
  private final String mSharingPath;
  @NonNull
  private final String mErrorString;

  private BookmarkSharingResult(long categoryId, @Code int code,
                                @NonNull String sharingPath,
                                @NonNull String errorString)
  {
    mCategoryId = categoryId;
    mCode = code;
    mSharingPath = sharingPath;
    mErrorString = errorString;
  }

  public long getCategoryId()
  {
    return mCategoryId;
  }

  public int getCode()
  {
    return mCode;
  }

  @NonNull
  public String getSharingPath()
  {
    return mSharingPath;
  }

  @NonNull
  public String getErrorString()
  {
    return mErrorString;
  }
}