Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14792 manas 1
/**
2
 * Copyright 2010-present Facebook.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *    http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
 
17
package com.facebook;
18
 
19
import com.facebook.internal.NativeProtocol;
20
 
21
/**
22
 * Certain operations such as publishing a status or publishing a photo require an audience. When the user
23
 * grants an application permission to perform a publish operation, a default audience is selected as the
24
 * publication ceiling for the application. This enumerated value allows the application to select which
25
 * audience to ask the user to grant publish permission for.
26
 */
27
public enum SessionDefaultAudience {
28
    /**
29
     * Represents an invalid default audience value, can be used when only reading.
30
     */
31
    NONE(null),
32
 
33
    /**
34
     * Indicates only the user is able to see posts made by the application.
35
     */
36
    ONLY_ME(NativeProtocol.AUDIENCE_ME),
37
 
38
    /**
39
     * Indicates that the user's friends are able to see posts made by the application.
40
     */
41
    FRIENDS(NativeProtocol.AUDIENCE_FRIENDS),
42
 
43
    /**
44
     * Indicates that all Facebook users are able to see posts made by the application.
45
     */
46
    EVERYONE(NativeProtocol.AUDIENCE_EVERYONE);
47
 
48
    private final String nativeProtocolAudience;
49
 
50
    private SessionDefaultAudience(String protocol) {
51
        nativeProtocolAudience = protocol;
52
    }
53
 
54
    public String getNativeProtocolAudience() {
55
        return nativeProtocolAudience;
56
    }
57
}