Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Pull request to update for supporting LCP #68

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Classes/ContainerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#import "RDPackage.h"
#import "SpineItemListController.h"

#import "drmInitialize.h"

@interface ContainerController () <
RDContainerDelegate,
Expand Down Expand Up @@ -290,5 +291,11 @@ - (void)viewWillAppear:(BOOL)animated {
}
}

- (void)containerRegisterContentModules:(RDContainer *)container{
#ifdef _READIUM_DRM_
[[[DrmInitialize alloc] init] initialize];
#endif
}


@end
20 changes: 13 additions & 7 deletions Classes/ContainerListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,19 @@ - (void)onContainerListDidChange {
tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NSString *path = [m_paths objectAtIndex:indexPath.row];
ContainerController *c = [[ContainerController alloc] initWithPath:path];

if (c != nil) {
[self.navigationController pushViewController:c animated:YES];
}
dispatch_queue_t backgroundQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(backgroundQueue, ^{

[tableView deselectRowAtIndexPath:indexPath animated:YES];
NSString *path = [m_paths objectAtIndex:indexPath.row];
ContainerController *c = [[ContainerController alloc] initWithPath:path];

dispatch_async(dispatch_get_main_queue(), ^{
if (c != nil) {
[self.navigationController pushViewController:c animated:YES];
}
});
});
}


Expand Down
30 changes: 30 additions & 0 deletions Classes/drmInitialize.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// DrmInitialize.h
// SDKLauncher-OSX
//
// Created by DRM inside Development Team on 2015-08-16.
// ( T.H. Kim, H.D. Yoon, H.S. Lee and C.H. Yu )
//
// Copyright (c) 2015 The Readium Foundation and contributors. All rights reserved.
//
// The Readium SDK is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>
//
#import <Foundation/Foundation.h>

@interface DrmInitialize : NSObject

- (void)initialize;

@end

2 changes: 2 additions & 0 deletions SDKLauncher-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@
A250D54A5C423A86C6099037 /* epub30-test-0220-20131022.epub */ = {isa = PBXFileReference; lastKnownFileType = file.epub; path = "epub30-test-0220-20131022.epub"; sourceTree = "<group>"; };
A250D58D34D67FC218608A1F /* epub30-test-0120-20131022.epub */ = {isa = PBXFileReference; lastKnownFileType = file.epub; path = "epub30-test-0120-20131022.epub"; sourceTree = "<group>"; };
A250DD41B691E2CA16B1735D /* epubReadingSystem.epub */ = {isa = PBXFileReference; lastKnownFileType = file.epub; path = epubReadingSystem.epub; sourceTree = "<group>"; };
FFE961DC1C16E73100FA2A5C /* drmInitialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = drmInitialize.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -615,6 +616,7 @@
345CA3E116C00EE100B8B56A /* Main */ = {
isa = PBXGroup;
children = (
FFE961DC1C16E73100FA2A5C /* drmInitialize.h */,
3462FBBA16BC3C43003C79E1 /* AppDelegate.h */,
3462FBBB16BC3C43003C79E1 /* AppDelegate.m */,
340535A816BC5DD100D4A802 /* BaseViewController.h */,
Expand Down
2 changes: 1 addition & 1 deletion readium-sdk