1 /* vim: set ts=4 sw=4 et: */
3 * maemo-recorder-file.h
4 * File-related operations
6 * Copyright (C) 2006 Nokia Corporation
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef MAEMO_RECORDER_FILE_H_
25 #define MAEMO_RECORDER_FILE_H_
28 #include <libgnomevfs/gnome-vfs.h>
32 #define EXTENSION_ILBC ".ilbc"
33 #define EXTENSION_RAW ".raw"
34 #define EXTENSION_PCMA ".pcma"
35 #define EXTENSION_PCMU ".pcmu"
36 #define EXTENSION_MP3 ".mp3"
37 #define EXTENSION_AU ".au"
38 #define EXTENSION_SND ".snd"
39 #define EXTENSION_WAV ".wav"
41 #define DEFAULT_TMP_PCMA_FILE "mrec.pcma"
42 #define DEFAULT_TMP_PCMU_FILE "mrec.pcmu"
43 #define DEFAULT_TMP_FILE "mrec.raw"
44 #define DEFAULT_TMP_WAV_FILE "mrec.wav"
45 #define DEFAULT_TMP_ILBC_FILE "mrec.ilbc"
48 gboolean doSave(const gchar *tmpfile, const gchar *target, AudioFormat format);
51 gboolean openFile(const gchar *filename, AudioFormat *format, gchar **tmpfile);
53 gboolean saveFile(const gchar *filename, const gchar *tmpfile, AudioFormat format, gchar **newfile);
55 const gchar * getExtension(gint format);
57 GnomeVFSFileSize getFileLength(const gchar *file);