Beispiel #1
0
        public static string GetDescription(MediaType mediaType, DrmState state)
        {
            switch (state)
            {
            case DrmState.Unknown:
                return(_unknownDescription);

            case DrmState.NoLicense:
                return(_noLicenseDescription);

            case DrmState.Expired:
                return(MediaType.Track == mediaType ? _subscriptionExpiredDescription : _rentalDescription);

            case DrmState.DeviceLicense:
                return(_rentalDescription);

            case DrmState.Expiring:
                return(MediaType.Track == mediaType ? _subscriptionDescription : _rentalDescription);

            case DrmState.Protected:
                return(MediaType.Track == mediaType ? _protectedDescription : _purchasedDescription);

            case DrmState.Free:
                return(_personalDescription);

            default:
                return(_unknownDescription);
            }
        }
Beispiel #2
0
        public static bool IsRental(int state, bool fIncludeExpired)
        {
            DrmState drmState = (DrmState)state;

            switch (drmState)
            {
            case DrmState.DeviceLicense:
            case DrmState.Expiring:
                return(true);

            default:
                return(fIncludeExpired && drmState == DrmState.Expired);
            }
        }