Permalink
Browse files

First Commit

  • Loading branch information...
djfumberger committed Oct 28, 2008
0 parents commit 930a64455f9f1b2133425627eef274ffc2997e4b
Showing with 27,257 additions and 0 deletions.
  1. +20 −0 Classes/AlbumData.h
  2. +60 −0 Classes/AlbumData.m
  3. +20 −0 Classes/AlbumsViewController.h
  4. +121 −0 Classes/AlbumsViewController.m
  5. +14 −0 Classes/ArtistData.h
  6. +20 −0 Classes/ArtistData.m
  7. +16 −0 Classes/ArtistTabController.h
  8. +18 −0 Classes/ArtistTabController.m
  9. +16 −0 Classes/ArtistViewController.h
  10. +74 −0 Classes/ArtistViewController.m
  11. +20 −0 Classes/Base64.h
  12. +116 −0 Classes/Base64.m
  13. +30 −0 Classes/BaseCell.h
  14. +95 −0 Classes/BaseCell.m
  15. +37 −0 Classes/BaseView.h
  16. +201 −0 Classes/BaseView.m
  17. +111 −0 Classes/BaseViewController.h
  18. +642 −0 Classes/BaseViewController.m
  19. +22 −0 Classes/Cache.h
  20. +70 −0 Classes/Cache.m
  21. +62 −0 Classes/CellTextField.h
  22. +142 −0 Classes/CellTextField.m
  23. +61 −0 Classes/CellTextView.h
  24. +102 −0 Classes/CellTextView.m
  25. +85 −0 Classes/Constants.h
  26. +14 −0 Classes/Constants.m
  27. +19 −0 Classes/Crc32.h
  28. +56 −0 Classes/Crc32.m
  29. +22 −0 Classes/DirectoryViewController.h
  30. +105 −0 Classes/DirectoryViewController.m
  31. +64 −0 Classes/DisplayCell.h
  32. +131 −0 Classes/DisplayCell.m
  33. +79 −0 Classes/EditableTableViewCell.h
  34. +62 −0 Classes/EditableTableViewCell.m
  35. +18 −0 Classes/EpisodesViewController.h
  36. +121 −0 Classes/EpisodesViewController.m
  37. +19 −0 Classes/FileSystemData.h
  38. +44 −0 Classes/FileSystemData.m
  39. +20 −0 Classes/GUIStatus.h
  40. +21 −0 Classes/GUIStatus.m
  41. +16 −0 Classes/GenreData.h
  42. +14 −0 Classes/GenreData.m
  43. +16 −0 Classes/GenresViewController.h
  44. +64 −0 Classes/GenresViewController.m
  45. +16 −0 Classes/HTTP.h
  46. +14 −0 Classes/HTTP.m
  47. +34 −0 Classes/HTTPRequest.h
  48. +184 −0 Classes/HTTPRequest.m
  49. +18 −0 Classes/InterfaceManager.h
  50. +64 −0 Classes/InterfaceManager.m
  51. +132 −0 Classes/Key.h
  52. +17 −0 Classes/LoadingViewController.h
  53. +41 −0 Classes/LoadingViewController.m
  54. +16 −0 Classes/MainNavigationController.h
  55. +76 −0 Classes/MainNavigationController.m
  56. +16 −0 Classes/MainViewController.h
  57. +75 −0 Classes/MainViewController.m
  58. +23 −0 Classes/MediaInfoData.h
  59. +17 −0 Classes/MediaInfoData.m
  60. +35 −0 Classes/MediaInfoViewController.h
  61. +240 −0 Classes/MediaInfoViewController.m
  62. +18 −0 Classes/MovieData.h
  63. +27 −0 Classes/MovieData.m
  64. +19 −0 Classes/MoviePath.h
  65. +51 −0 Classes/MoviePath.m
  66. +17 −0 Classes/MoviesViewController.h
  67. +105 −0 Classes/MoviesViewController.m
  68. +22 −0 Classes/MusicPath.h
  69. +123 −0 Classes/MusicPath.m
  70. +16 −0 Classes/MusicSharesViewController.h
  71. +27 −0 Classes/MusicSharesViewController.m
  72. BIN Classes/NPAStop.png
  73. +20 −0 Classes/NPAlbumViewController.h
  74. +114 −0 Classes/NPAlbumViewController.m
  75. +21 −0 Classes/NPPlaylistViewController.h
  76. +60 −0 Classes/NPPlaylistViewController.m
  77. +60 −0 Classes/NavTestAppDelegate.h
  78. +175 −0 Classes/NavTestAppDelegate.m
  79. +78 −0 Classes/NowPlayingData.h
  80. +86 −0 Classes/NowPlayingData.m
  81. +1,385 −0 Classes/NowPlayingView.xib
  82. +95 −0 Classes/NowPlayingViewController.h
  83. +437 −0 Classes/NowPlayingViewController.m
  84. +28 −0 Classes/PathItem.h
  85. +19 −0 Classes/PathItem.m
  86. +16 −0 Classes/PlaylistsViewController.h
  87. +44 −0 Classes/PlaylistsViewController.m
  88. +16 −0 Classes/PodcastViewController.h
  89. +61 −0 Classes/PodcastViewController.m
  90. +124 −0 Classes/RemoteInterface.h
  91. +1,142 −0 Classes/RemoteInterface.m
  92. +17 −0 Classes/RemoteMoreViewController.h
  93. +271 −0 Classes/RemoteMoreViewController.m
  94. +43 −0 Classes/RemoteTouchView.h
  95. +265 −0 Classes/RemoteTouchView.m
  96. +56 −0 Classes/RemoteViewContoller.h
  97. +365 −0 Classes/RemoteViewContoller.m
  98. +16 −0 Classes/SeasonsViewController.h
  99. +67 −0 Classes/SeasonsViewController.m
  100. +28 −0 Classes/SettingsEditViewController.h
  101. +263 −0 Classes/SettingsEditViewController.m
  102. +21 −0 Classes/SettingsViewController.h
  103. +255 −0 Classes/SettingsViewController.m
  104. +16 −0 Classes/ShareData.h
  105. +22 −0 Classes/ShareData.m
  106. +16 −0 Classes/SharesViewController.h
  107. +33 −0 Classes/SharesViewController.m
  108. +16 −0 Classes/Sleep.h
  109. +33 −0 Classes/Sleep.m
  110. +25 −0 Classes/SongData.h
  111. +40 −0 Classes/SongData.m
  112. +17 −0 Classes/SongsViewController.h
  113. +125 −0 Classes/SongsViewController.m
  114. +21 −0 Classes/TVCell.h
  115. +73 −0 Classes/TVCell.m
  116. +27 −0 Classes/TVCellView.h
  117. +199 −0 Classes/TVCellView.m
  118. +16 −0 Classes/TVShowData.h
  119. +25 −0 Classes/TVShowData.m
  120. +16 −0 Classes/TVShowsViewController.h
  121. +98 −0 Classes/TVShowsViewController.m
  122. +19 −0 Classes/TouchTableView.h
  123. +75 −0 Classes/TouchTableView.m
  124. +19 −0 Classes/Utility.h
  125. +61 −0 Classes/Utility.m
  126. +24 −0 Classes/VideoData.h
  127. +58 −0 Classes/VideoData.m
  128. +22 −0 Classes/VideoPath.h
  129. +94 −0 Classes/VideoPath.m
  130. +14 −0 Classes/VideoSharesViewController.h
  131. +27 −0 Classes/VideoSharesViewController.m
  132. +49 −0 Classes/ViewData.h
  133. +295 −0 Classes/ViewData.m
  134. +16 −0 Classes/ViewsNavigationController.h
  135. +16 −0 Classes/ViewsNavigationController.m
  136. +15 −0 Classes/XBMCHTTP.h
  137. +14 −0 Classes/XBMCHTTP.m
  138. +30 −0 Classes/XBMCHostData.h
  139. +56 −0 Classes/XBMCHostData.m
  140. +31 −0 Classes/XBMCSettings.h
  141. +166 −0 Classes/XBMCSettings.m
  142. +20 −0 Classes/XMLParse.h
  143. +72 −0 Classes/XMLParse.m
  144. +16 −0 Classes/XUIImage.h
  145. +22 −0 Classes/XUIImage.m
  146. +16 −0 Classes/untitled.h
  147. +35 −0 Classes/untitled.m
  148. +14 −0 Info.plist
  149. +25 −0 LICENSE
  150. 0 README
  151. BIN Resources/Images/AIconFile.png
  152. BIN Resources/Images/AIconFolder.png
  153. BIN Resources/Images/AIconMusic.png
  154. BIN Resources/Images/AIconVideo.png
  155. BIN Resources/Images/AIconVideoWide.png
  156. BIN Resources/Images/Album.png
  157. BIN Resources/Images/MusicNowPlayingXBMC.png
  158. BIN Resources/Images/NPANext.png
  159. BIN Resources/Images/NPAPause.png
  160. BIN Resources/Images/NPAPlay.png
  161. BIN Resources/Images/NPAPrev.png
  162. BIN Resources/Images/NPARepeat.png
  163. BIN Resources/Images/NPARepeatOn.png
  164. BIN Resources/Images/NPARepeatOne.png
  165. BIN Resources/Images/NPAShuffle.png
  166. BIN Resources/Images/NPAShuffleOn.png
  167. BIN Resources/Images/NPBackBar.png
  168. BIN Resources/Images/NPIcon.png
  169. BIN Resources/Images/NPIcon2.png
  170. BIN Resources/Images/NPNext.png
  171. BIN Resources/Images/NPPause.png
  172. BIN Resources/Images/NPPlay.png
  173. BIN Resources/Images/NPPrev.png
  174. BIN Resources/Images/NPStop.png
  175. BIN Resources/Images/NowPlayingBar.png
  176. BIN Resources/Images/TBMAlbum.png
  177. BIN Resources/Images/TBMArtists.png
  178. BIN Resources/Images/TBMAudiobooks.png
  179. BIN Resources/Images/TBMCompliations.png
  180. BIN Resources/Images/TBMComposers.png
  181. BIN Resources/Images/TBMGenres.png
  182. BIN Resources/Images/TBMMovies.png
  183. BIN Resources/Images/TBMMusicVideos.png
  184. BIN Resources/Images/TBMPlaylists.png
  185. BIN Resources/Images/TBMPlaylistsAlt.png
  186. BIN Resources/Images/TBMPodcasts.png
  187. BIN Resources/Images/TBMSongs.png
  188. BIN Resources/Images/TBMTVShows.png
  189. BIN Resources/Images/buttonblue.png
  190. BIN Resources/Images/buttonbluethree.png
  191. BIN Resources/Images/buttonbluetwo.png
  192. BIN Resources/Images/buttongrey.png
  193. BIN Resources/Images/new-remote.png
  194. BIN Resources/Images/next.png
  195. BIN Resources/Images/now_playing.png
  196. BIN Resources/Images/pause.png
  197. BIN Resources/Images/play.png
  198. BIN Resources/Images/plbutton.png
  199. BIN Resources/Images/prev.png
  200. BIN Resources/Images/remote-alt-down.png
  201. BIN Resources/Images/remote-alt-left.png
  202. BIN Resources/Images/remote-alt-right.png
  203. BIN Resources/Images/remote-alt-up.png
  204. BIN Resources/Images/remote-bg.png
  205. BIN Resources/Images/remote-down.png
  206. BIN Resources/Images/remote-eye.png
  207. BIN Resources/Images/remote-gesture-icon.png
  208. BIN Resources/Images/remote-gesture.png
  209. BIN Resources/Images/remote-info.png
  210. BIN Resources/Images/remote-left.png
  211. BIN Resources/Images/remote-ok.png
  212. BIN Resources/Images/remote-options.png
  213. BIN Resources/Images/remote-right.png
  214. BIN Resources/Images/remote-up.png
  215. BIN Resources/Images/remotebg.png
  216. BIN Resources/Images/standard-remote.png
  217. BIN Resources/Images/touchpoint.png
  218. BIN Resources/Images/xbmc.png
  219. BIN Resources/Images/xbmcbw.png
  220. +156 −0 Resources/NIB/AlbumInfoView.xib
  221. +160 −0 Resources/NIB/AlbumView.xib
  222. +174 −0 Resources/NIB/AlbumsViewController.xib
  223. +261 −0 Resources/NIB/ArtistTabController.xib
  224. +170 −0 Resources/NIB/ArtistViewController.xib
  225. +255 −0 Resources/NIB/Loading.xib
  226. +1,773 −0 Resources/NIB/MainWindow.xib
  227. +153 −0 Resources/NIB/MediaInfoView.xib
  228. +126 −0 Resources/NIB/MoreView.xib
  229. +142 −0 Resources/NIB/NPAlbumView.xib
  230. +237 −0 Resources/NIB/NPPlaylistView.xib
  231. +1,416 −0 Resources/NIB/Remote.xib
  232. +114 −0 Resources/NIB/SettingsNavigationView.xib
  233. +135 −0 Resources/NIB/SettingsView.xib
  234. +114 −0 Resources/NIB/untitled.xib
  235. BIN icon.png
  236. BIN icon57.png
  237. +17 −0 main.m
  238. +16 −0 untitled.h
  239. +14 −0 untitled.m
  240. BIN xbmcremote.app/AIconFile.png
  241. BIN xbmcremote.app/AIconFolder.png
  242. BIN xbmcremote.app/AIconMusic.png
  243. BIN xbmcremote.app/AIconVideo.png
  244. BIN xbmcremote.app/AIconVideoWide.png
  245. BIN xbmcremote.app/Album.png
  246. BIN xbmcremote.app/AlbumInfoView.nib
  247. BIN xbmcremote.app/AlbumView.nib
  248. BIN xbmcremote.app/AlbumsViewController.nib
  249. BIN xbmcremote.app/ArtistViewController.nib
  250. +36 −0 xbmcremote.app/Info.plist
  251. BIN xbmcremote.app/Loading.nib
  252. BIN xbmcremote.app/MainWindow.nib
  253. BIN xbmcremote.app/MediaInfoView.nib
  254. BIN xbmcremote.app/MoreView.nib
  255. BIN xbmcremote.app/MusicNowPlaying.png
  256. BIN xbmcremote.app/MusicNowPlayingXBMC.png
  257. BIN xbmcremote.app/NPANext.png
  258. BIN xbmcremote.app/NPAPause.png
  259. BIN xbmcremote.app/NPAPlay.png
  260. BIN xbmcremote.app/NPAPrev.png
  261. BIN xbmcremote.app/NPAStop.png
  262. BIN xbmcremote.app/NPAlbumView.nib
  263. BIN xbmcremote.app/NPBackBar.png
  264. BIN xbmcremote.app/NPPlaylistView.nib
  265. BIN xbmcremote.app/NowPlayingBar.png
  266. BIN xbmcremote.app/NowPlayingView.nib
  267. +1 −0 xbmcremote.app/PkgInfo
  268. BIN xbmcremote.app/Remote.nib
  269. +25 −0 xbmcremote.app/ResourceRules.plist
  270. BIN xbmcremote.app/SettingsNavigationView.nib
  271. BIN xbmcremote.app/SettingsView.nib
  272. BIN xbmcremote.app/TBMAlbum.png
  273. BIN xbmcremote.app/TBMArtists.png
  274. BIN xbmcremote.app/TBMAudiobooks.png
  275. BIN xbmcremote.app/TBMCompliations.png
  276. BIN xbmcremote.app/TBMComposers.png
  277. BIN xbmcremote.app/TBMGenres.png
  278. BIN xbmcremote.app/TBMMovies.png
  279. BIN xbmcremote.app/TBMMusicVideos.png
  280. BIN xbmcremote.app/TBMPlaylists.png
  281. BIN xbmcremote.app/TBMPlaylistsAlt.png
  282. BIN xbmcremote.app/TBMPodcasts.png
  283. BIN xbmcremote.app/TBMSongs.png
  284. BIN xbmcremote.app/TBMTVShows.png
  285. BIN xbmcremote.app/buttonblue.png
  286. BIN xbmcremote.app/buttonbluethree.png
  287. BIN xbmcremote.app/buttonbluetwo.png
  288. BIN xbmcremote.app/buttongrey.png
  289. BIN xbmcremote.app/embedded.mobileprovision
  290. BIN xbmcremote.app/icon.png
  291. BIN xbmcremote.app/icon57.png
  292. BIN xbmcremote.app/plbutton.png
  293. BIN xbmcremote.app/untitled.nib
  294. BIN xbmcremote.app/xbmc.png
  295. BIN xbmcremote.app/xbmcbw.png
  296. +1,673 −0 xbmcremote.xcodeproj/djfumberger.mode1v3
  297. +6,624 −0 xbmcremote.xcodeproj/djfumberger.pbxuser
  298. +1,147 −0 xbmcremote.xcodeproj/project.pbxproj
  299. +8 −0 xbmcremote_Prefix.pch
@@ -0,0 +1,20 @@
+//
+// AlbumData.h
+// NavTest
+//
+// Created by David Fumberger on 4/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "XBMCSettings.h";
+#import "ViewData.h";
+@interface AlbumData : ViewData {
+ NSString *artistId;
+ NSString *artistTitle;
+}
+- initWithDictionary:(NSDictionary *)dict ;
+- (void)fetchThumbnail ;
+@property (nonatomic, retain) NSString *artistId;
+@property (nonatomic, retain) NSString *artistTitle;
+@end
@@ -0,0 +1,60 @@
+//
+// AlbumData.m
+// NavTest
+//
+// Created by David Fumberger on 4/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import "AlbumData.h"
+#import "Cache.h";
+@implementation AlbumData
+@synthesize artistId;
+@synthesize artistTitle;
++ (void)initialize {
+ NSLog(@"Init albumdata");
+}
+/*
+- init {
+ if ( self.thumbnail == @"" || [ self.thumbnail isEqualToString:@"NONE"] ) {
+ self.checkedImage = YES;
+ } else {
+ self.checkedImage = NO;
+ }
+ return [super init];
+}*/
+- initWithDictionary:(NSDictionary *)dict {
+
+ if (self = [super initWithDictionary:dict]) {
+ self.maxThumbResolution = 50;
+ self.externalImage = NO;
+ self.title = [dict objectForKey:@"title"];
+ self.identifier = [dict objectForKey:@"id"];
+
+ //self.thumbnail_path = [dict objectForKey:@"thumbnail"];
+ self.artistId = [dict objectForKey:@"artistId"];
+ self.artistTitle = [dict objectForKey:@"artistTitle"];
+ }
+ return self;
+}
+- (void)setThumbnailData { }
+- (BOOL)fetchThumbnail {
+ //[self setThumbnailFromPath];
+ return [super fetchThumbnail];
+}
+- (void)setThumbnailFromPath {
+ return [self setThumbnailFromPathForType: @"Music"];
+}
+- (UIImage*)defaultImage {
+ return [UIImage imageNamed:@"AIconMusic.png"];
+}
+- (NSInteger)cacheType {
+ return CACHE_TYPE_MUSIC;
+}
+-(void)dealloc {
+ //NSLog(@"Album Data - dealloc");
+ [artistId release];
+ [artistTitle release];
+ [super dealloc];
+}
+@end
@@ -0,0 +1,20 @@
+//
+// AlbumsViewController.h
+// NavTest
+//
+// Created by David Fumberger on 1/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "MusicPath.h";
+#import "SongsViewController.h";
+#import "BaseViewController.h";
+
+@interface AlbumsViewController : BaseViewController {
+ BOOL multipleArtists;
+}
+
+
+
+@end
@@ -0,0 +1,121 @@
+//
+// AlbumsViewController.m
+// NavTest
+//
+// Created by David Fumberger on 1/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import "AlbumsViewController.h"
+#import "SongsViewController.h";
+#import "NavTestAppDelegate.h"
+#import "LoadingViewController.h";
+#import "BaseCell.h";
+#import "BaseView.h";
+#import "AlbumData.h";
+#import "MusicPath.h";
+#import "PathItem.h";
+
+@implementation AlbumsViewController
+
+
+- (void)setupView {
+ [super setupView];
+ hasImage = TRUE;
+ rowHeight = 55;
+ cellIdentifier = @"AlbumsViewController";
+ actionCellText = @"All Songs";
+}
+
+- (void)checkMultipleArtists {
+ multipleArtists = NO;
+ if ([displayData count] == 0) {
+ return;
+ }
+ AlbumData *first = [displayData objectAtIndex:0];
+ NSString *lastArtist = first.artistTitle;
+ for ( AlbumData *albumData in displayData ) {
+ NSString *currentArtist = albumData.artistTitle;
+ if (![lastArtist isEqualToString:currentArtist]) {
+ multipleArtists = YES;
+ break;
+ }
+ }
+}
+
+- (void)doneLoad {
+ [super doneLoad];
+ [self checkMultipleArtists];
+ if ( [displayData count] > 10) {
+ sectionViewStyle = SECTION_VIEW_INDEXED;
+ } else {
+ sectionViewStyle = SECTION_VIEW_NORMAL;
+ }
+
+ //hasImage = NO;
+ //sectionViewStyle = SECTION_VIEW_NORMAL;
+ //actionSections = 0;
+ //cellIdentifier = @"ArtistViewCell";
+}
+
+- (void)loadData {
+ displayData = [[XBMCInterface GetAlbumsForMusicPath:self.musicPath] retain];
+}
+
+
+- (UITableViewCell*)getDataCell:(UITableView *)callingTableView data:(ViewData*)data{
+ AlbumData *albumData = (AlbumData*)data;
+ BaseCell *cell = (BaseCell*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
+ if (cell == nil) {
+ cell = [[[BaseCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease];
+ cell.imageWidth = rowHeight;
+ cell.imageHeight = rowHeight;
+ }
+
+ NSString *subTitle = nil;
+ if (multipleArtists == YES) {
+ subTitle = albumData.artistTitle;
+ }
+ [ cell setData: data showImage: hasImage subTitle: subTitle];
+ // Set up the cell
+ return cell;
+}
+- (void)selectedActionCell:(NSInteger)index {
+ [self selectedDataCell:nil];
+}
+- (void)selectedDataCell:(ViewData*)data {
+
+ SongsViewController *targetController = [[SongsViewController alloc] init];
+
+ PathItem *pathItem = [[PathItem alloc] init];
+ pathItem.type = PATH_TYPE_ALBUM;
+ if (data == nil) {
+ targetController.title = @"All Songs";
+ } else {
+ targetController.title = self.title;
+ targetController.albumName = data.title;
+ pathItem.value = data.identifier;
+ }
+
+ //Create new music path from this one and add new item
+ MusicPath *newMusicPath = [MusicPath pathFromPath: musicPath];
+ [newMusicPath addItem:pathItem];
+ [targetController setMusicPath: newMusicPath];
+ [[self navigationController] pushViewController:targetController animated:YES ];
+ [targetController release];
+ [newMusicPath release];
+ [pathItem release];
+}
+
+
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ // Return YES for supported orientations
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+- (void)didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
+ // Release anything that's not essential, such as cached data
+}
+
+@end
@@ -0,0 +1,14 @@
+//
+// ArtistData.h
+// NavTest
+//
+// Created by David Fumberger on 6/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "ViewData.h";
+
+@interface ArtistData : ViewData {
+}
+@end
@@ -0,0 +1,20 @@
+//
+// ArtistData.m
+// NavTest
+//
+// Created by David Fumberger on 6/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import "ArtistData.h"
+
+@implementation ArtistData
+@synthesize checkedImage;
++ (void)initialize {
+ NSLog(@"Init ArtistData");
+ [super initialize];
+}
+
+
+@end
+
@@ -0,0 +1,16 @@
+//
+// ArtistTabController.h
+// NavTest
+//
+// Created by David Fumberger on 2/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface ArtistTabController : UIViewController {
+ IBOutlet UINavigationController *navigationController;
+}
+
+@end
@@ -0,0 +1,18 @@
+//
+// ArtistTabController.m
+// NavTest
+//
+// Created by David Fumberger on 2/08/08.
+// Copyright 2008 collect3. All rights reserved.
+//
+
+#import "ArtistTabController.h"
+#import "RootViewController.h"
+
+@implementation ArtistTabController
+- (void)viewDidLoad {
+[self.view addSubview:navigationController.view];
+ //UITableViewController *targetController = [[RootViewController alloc] init];
+ //[navigationController setView:targetController.view ];
+}
+@end
@@ -0,0 +1,16 @@
+//
+// RootViewController.h
+// NavTest
+//
+// Created by David Fumberger on 30/07/08.
+// Copyright collect3 2008. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "BaseViewController.h";
+
+@interface ArtistViewController : BaseViewController {
+
+}
+
+@end
@@ -0,0 +1,74 @@
+//
+// RootViewController.m
+// NavTest
+//
+// Created by David Fumberger on 30/07/08.
+// Copyright collect3 2008. All rights reserved.
+//
+
+#import "ArtistViewController.h";
+#import "AlbumsViewController.h";
+#import "NavTestAppDelegate.h"
+#import "ArtistData.h";
+#import "PathItem.h";
+#import "BaseViewController.h";
+#import "BaseCell.h";
+
+@implementation ArtistViewController
+- (void)setupView {
+ [super setupView];
+ sectionTitle = @"Artists";
+ cellIdentifier = @"ArtistViewCell";
+ actionCellText = @"All Albums";
+}
+- (void)doneLoad {
+ [super doneLoad];
+
+ hasImage = NO;
+ //sectionViewStyle = SECTION_VIEW_NORMAL;
+}
+
+- (void)loadData {
+ displayData = [[XBMCInterface GetArtistsForMusicPath:musicPath] retain];
+ NSLog(@"Number of artists %d", [displayData count]);
+}
+
+
+- (void)selectedActionCell:(NSInteger)index {
+ [self selectedDataCell:nil];
+}
+- (void)selectedDataCell:(ViewData*)data {
+ AlbumsViewController *targetController = [[AlbumsViewController alloc] init];
+
+ PathItem *pathItem = [[PathItem alloc] init];
+ pathItem.type = PATH_TYPE_ARTIST;
+ if (data == nil) {
+ targetController.title = @"Albums";
+ } else {
+ targetController.title = data.title;
+ pathItem.value = data.identifier;
+ }
+
+ // Create new music path from this one and add new item
+ MusicPath *newMusicPath = [MusicPath pathFromPath: musicPath];
+ [newMusicPath addItem:pathItem];
+ [targetController setMusicPath: newMusicPath];
+ [[self navigationController] pushViewController:targetController animated:YES ];
+ [targetController release];
+ [newMusicPath release];
+ [pathItem release];
+}
+
+- (void)didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
+ // Release anything that's not essential, such as cached data
+}
+
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+
+@end
+
Oops, something went wrong.

0 comments on commit 930a644

Please sign in to comment.