sbSecurityMixin.cpp File Reference
#include "sbSecurityMixin.h"
#include <sbClassInfoUtils.h>
#include <sbMemoryUtils.h>
#include <sbTArrayStringEnumerator.h>
#include <nsIConsoleService.h>
#include <nsIPermissionManager.h>
#include <nsIPrefBranch.h>
#include <nsIScriptSecurityManager.h>
#include <nsServiceManagerUtils.h>
#include <nsStringGlue.h>
#include <prlog.h>
#include <plstr.h>
#include "sbRemotePlayer.h"
Include dependency graph for sbSecurityMixin.cpp:

Go to the source code of this file.

Classes

struct  Scope
 

Macros

#define PERM_TYPE_PLAYBACK_CONTROL   "rapi.playback_control"
 
#define PERM_TYPE_PLAYBACK_READ   "rapi.playback_read"
 
#define PERM_TYPE_LIBRARY_READ   "rapi.library_read"
 
#define PERM_TYPE_LIBRARY_WRITE   "rapi.library_write"
 
#define PREF_PLAYBACK_CONTROL   "playback_control_disable"
 
#define PREF_PLAYBACK_READ   "playback_read_disable"
 
#define PREF_LIBRARY_READ   "library_read_disable"
 
#define PREF_LIBRARY_WRITE   "library_write_disable"
 
#define LOG(args)   PR_LOG(gLibraryLog, PR_LOG_WARN, args)
 

Functions

static NS_DEFINE_CID (kSecurityMixinCID,{0xaaae98ec, 0x386e, 0x405e,{0xb1, 0x09, 0xcf, 0x1a, 0x87, 0x2e, 0xf6, 0xdd}})
 
 NS_IMPL_ISUPPORTS3 (sbSecurityMixin, nsIClassInfo, nsISecurityCheckedComponent, sbISecurityMixin) NS_IMPL_CI_INTERFACE_GETTER2(sbSecurityMixin
 
sbISecurityMixin SB_IMPL_CLASSINFO (sbSecurityMixin,"@songbirdnest.com/remoteapi/security-mixin;1","Songbird Remote Security Mixin", nsIProgrammingLanguage::CPLUSPLUS, 0, kSecurityMixinCID)
 
char * SB_CloneAllAccess ()
 

Variables

static const char * sNotificationNone = "none"
 
static const char * sNotificationHat = "hat"
 
static const char * sNotificationAlert = "alert"
 
static const char * sNotificationStatus = "status"
 
static const Scope sScopes []
 
 nsISecurityCheckedComponent
 

Macro Definition Documentation

#define LOG (   args)    PR_LOG(gLibraryLog, PR_LOG_WARN, args)

Definition at line 61 of file sbSecurityMixin.cpp.

#define PERM_TYPE_LIBRARY_READ   "rapi.library_read"

Definition at line 45 of file sbSecurityMixin.cpp.

#define PERM_TYPE_LIBRARY_WRITE   "rapi.library_write"

Definition at line 46 of file sbSecurityMixin.cpp.

#define PERM_TYPE_PLAYBACK_CONTROL   "rapi.playback_control"

Definition at line 43 of file sbSecurityMixin.cpp.

#define PERM_TYPE_PLAYBACK_READ   "rapi.playback_read"

Definition at line 44 of file sbSecurityMixin.cpp.

#define PREF_LIBRARY_READ   "library_read_disable"

Definition at line 50 of file sbSecurityMixin.cpp.

#define PREF_LIBRARY_WRITE   "library_write_disable"

Definition at line 51 of file sbSecurityMixin.cpp.

#define PREF_PLAYBACK_CONTROL   "playback_control_disable"

Definition at line 48 of file sbSecurityMixin.cpp.

#define PREF_PLAYBACK_READ   "playback_read_disable"

Definition at line 49 of file sbSecurityMixin.cpp.

Function Documentation

static NS_DEFINE_CID ( kSecurityMixinCID  ,
{0xaaae98ec, 0x386e, 0x405e,{0xb1, 0x09, 0xcf, 0x1a, 0x87, 0x2e, 0xf6, 0xdd}}   
)
static
char* SB_CloneAllAccess ( )
inline

Definition at line 734 of file sbSecurityMixin.cpp.

sbISecurityMixin SB_IMPL_CLASSINFO ( sbSecurityMixin  ,
"@songbirdnest.com/remoteapi/security-mixin;1"  ,
"Songbird Remote Security Mixin"  ,
nsIProgrammingLanguage::CPLUSPLUS  ,
,
kSecurityMixinCID   
)

Variable Documentation

nsISecurityCheckedComponent

Definition at line 92 of file sbSecurityMixin.cpp.

const char* sNotificationAlert = "alert"
static

Definition at line 65 of file sbSecurityMixin.cpp.

const char* sNotificationHat = "hat"
static

Definition at line 64 of file sbSecurityMixin.cpp.

const char* sNotificationNone = "none"
static

Definition at line 63 of file sbSecurityMixin.cpp.

const char* sNotificationStatus = "status"
static

Definition at line 66 of file sbSecurityMixin.cpp.

const Scope sScopes[]
static
Initial value:
= {
{ "playback_control", sNotificationHat, sNotificationNone, },
{ "playback_read", sNotificationHat, sNotificationNone, },
{ "library_read", sNotificationHat, sNotificationNone, },
{ "library_write", sNotificationAlert, sNotificationStatus, },
}
static const char * sNotificationNone
static const char * sNotificationStatus
static const char * sNotificationAlert
static const char * sNotificationHat

Definition at line 77 of file sbSecurityMixin.cpp.