Click here to Skip to main content
15,891,529 members
Articles / Mobile Apps / iPhone

Audiobook Player for iPhone

Rate me:
Please Sign up or sign in to vote.
4.73/5 (16 votes)
8 Sep 2010CPOL9 min read 85.6K   2.4K   27  
An iPhone media player designed specifically for listening to audiobooks
//
//  cLibraryVC.h
//  abPlayer
//
//  Created by Broch Pirate on 2/22/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "cPlayingVC.h"
#import "cPlayer.h"
#import "cPersistant.h"
#import "cMoveToVC.h"
#import "cBrowserNC.h"
#import "cTextAlert.h"

typedef enum  
{
	vsRoot = 0,
	vsShelfOrBook = 1,
	vsMedia = 2
} eViewStyle;

typedef enum  
{
	// Library
	vitRoot = 0,
	vitShelf = 1,
	vitBook = 2,
	// Browser FS
	vitLink = 0, 
	vitDir = 1,
	vitFile = 2,
	// Browser MP
	vitPredicate = 1,
	vitCollection = 2,
	// Browser FS & MP
	vitMedia = 3,
} eViewItemType;

typedef enum 
{
	ctNone = 0,
	ctAlbums = 1,
	ctArtists = 2,
	ctAudiobooks = 3,
	ctComposers = 4,
	ctGenre = 5,
	ctSongs = 6
} eCollectionType;

typedef enum
{
	ntShelf = 0,
	ntBook = 1
} eNewType;

typedef enum 
{
	avaNew = 1,
	avaRename = 2
} eAlertViewAction;

@interface cLibraryVC : UIViewController	<UITableViewDelegate, UITableViewDataSource, 
											UIActionSheetDelegate, UIScrollViewDelegate,
											UIAlertViewDelegate>
{
	UINavigationController* navCtrl;
	IBOutlet UIToolbar* tbr;
	IBOutlet UITableView* tbl;
	IBOutlet UIBarButtonItem* btnEdit;
	UITableViewCellEditingStyle editStyle;
	eViewStyle viewStyle; // 0=root view, 1=book/shelf, 2=media
	NSString* viewParam;
	NSMutableArray* viewItems;
	NSString* renameOrMoveType;
	int editItemIndex;
	eNewType newType;
	id responder;
	NSIndexPath* selectionPath;
	NSTimer* scanTimer;
	NSArray* scanArray;
	NSString* scanShelf;
	NSString* scanTitle;
	int scanIndex;
	eAlertViewAction alertViewAction;
	cTextAlert* textAlert;
}

@property (assign) id responder;

- (id)initWithNibNameAndMore:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 
				nav:(UINavigationController*) nav viewType:(eViewStyle)viewType viewRoot:(NSString*) viewRoot;
+(NSString*)getNibName;
-(void)reloadTableData;
-(void)btnPlayingPushed:(id)sender;
-(IBAction)btnNewPushed:(id)sender;
-(IBAction)btnAddFilesPushed:(id)sender;
-(IBAction)btnGraphicsPushed:(id)sender;
-(IBAction)btnEditPushed:(id)sender;
-(void)resetEditState;
-(void)setupViewList:(NSString*)inShelf;
-(void)reloadViewContent;
-(NSString*)doNew:(eNewType)type name:(NSString*)name shelf:(NSString*)shelf;
-(void)doRename:(NSString*)oldName newName:(NSString*)newName;
-(void)navigateToLowerLevel:(int)index;
-(void)MediaSelectionDone:(id)sender userInfo:(NSDictionary*)userInfo;
-(void)moveDidOccur:(id)sender userInfo:(NSDictionary*)userInfo;
-(void)setupCellSelection;
-(void)selectCell:(int)section row:(int)row;
-(void)scanEvent;
-(void)showInputAlert:(NSString*)title text:(NSString*)text;
-(void)textAlertBtnDonePushed:(NSString*)text;
@end

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions