/*
 * Copyright 2009-2013 the Fess Project and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

package jp.sf.fess.helper;

import jcifs.smb.SID;

public class SambaHelper {

    public static final int SID_TYPE_ALIAS = 4;

    public static final int SID_TYPE_DELETED = 6;

    public static final int SID_TYPE_DOM_GRP = 2;

    public static final int SID_TYPE_DOMAIN = 3;

    public static final int SID_TYPE_INVALID = 7;

    public static final int SID_TYPE_UNKNOWN = 8;

    public static final int SID_TYPE_USE_NONE = 0;

    public static final int SID_TYPE_USER = 1;

    public static final int SID_TYPE_WKN_GRP = 5;

    public String getAccountId(final SID sid) {
        return sid.getType() + "|" + sid.getAccountName();
    }
}
