javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/media/RTSPPermission.java
changeset 23 98ccebc37403
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 package com.nokia.mj.impl.media;
       
    20 
       
    21 import java.security.Permission;
       
    22 import java.security.PermissionCollection;
       
    23 import com.nokia.mj.impl.security.common.PermissionBase;
       
    24 import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
       
    25 
       
    26 public class RTSPPermission extends PermissionBase
       
    27 {
       
    28     public RTSPPermission(String aUri)
       
    29     {
       
    30         super(aUri);
       
    31     }
       
    32 
       
    33     /**
       
    34      * Returns the question (as localized text) associated with the security
       
    35      * prompt
       
    36      *
       
    37      * @return the localized text associated with the security prompt
       
    38      */
       
    39     public String getSecurityPromptQuestion(int aInteractionMode)
       
    40     {
       
    41         return (SecurityPromptMessage.getInstance()).getText(
       
    42                    SecurityPromptMessage.QUESTION_ID_NETWORK_USAGE,
       
    43                    null);
       
    44     }
       
    45 
       
    46 
       
    47     public String toString()
       
    48     {
       
    49         return "javax.microedition.io.Connector.rtsp";
       
    50     }
       
    51 
       
    52     public boolean implies(Permission p)
       
    53     {
       
    54         if (p instanceof RTSPPermission)
       
    55         {
       
    56             return true;
       
    57         }
       
    58         return false;
       
    59     }
       
    60 
       
    61     public boolean equals(Object obj)
       
    62     {
       
    63         return true;
       
    64     }
       
    65 
       
    66     public int hashCode()
       
    67     {
       
    68         return 0;
       
    69     }
       
    70 
       
    71     public String getActions()
       
    72     {
       
    73         return "";
       
    74     }
       
    75 
       
    76     public PermissionCollection newPermissionCollection()
       
    77     {
       
    78         return null;
       
    79     }
       
    80 }