// modified by Rob Burns <rburns@softhome.net>
/*
**  OGGEditor.h
**
**  Copyright (c) 2002
**
**  Author: Yen-Ju  <yjchenx@hotmail.com>
**
**  This program is free software; you can redistribute it and/or modify
**  it under the terms of the GNU Lesser General Public License as published by
**  the Free Software Foundation; either version 2 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 Lesser General Public License
**  along with this program; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#ifndef _OGGEDITOR_H_
#define _OGGEDITOR_H_

#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
#include <vorbis/vorbisfile.h>
#include "Util.h"

@interface OGGEditor: NSObject
{
  OggVorbis_File vf;
  FILE *in;
  NSMutableArray *_comments;
  NSString *_fname;
  NSMutableDictionary *_info;
}

- (BOOL) writeToFile: (NSString *) filename;
- (id) initWithFile: (NSString *) filename;
- (NSNumber *) decodedLength;
- (NSNumber *) lowerOfBitrate; /* double, in kb */
- (NSNumber *) upperOfBitrate; /* double, in kb */
- (NSNumber *) nominalOfBitrate; /* double, in kb */
- (NSNumber *) rate; /* float, in KHz */
- (NSNumber *) channels; /* int */
- (NSNumber *) seconds;
- (NSString *) filename;
- (NSArray *) comments;

- (void) addComment: (NSMutableDictionary *)comment;
- (void) deleteCommentAtIndex: (int) index;

// NSTableView data source protocol methods
//******************************************

- (int) numberOfRowsInTableView: (NSTableView *)aTableView;

- (id)            tableView: (NSTableView *)aTableView
  objectValueForTableColumn: (NSTableColumn *)aTableColumn
                        row: (int)rowIndex;

- (void) tableView: (NSTableView *)aTableView 
    setObjectValue: (id)anObject
    forTableColumn: (NSTableColumn *)aTableColumn 
               row: (int)rowIndex;

@end

#endif // _OGGEDITOR_H_

