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>
30 #define EXTENSION_ILBC ".ilbc"
31 #define EXTENSION_RAW ".raw"
32 #define EXTENSION_PCMA ".pcma"
33 #define EXTENSION_PCMU ".pcmu"
34 #define EXTENSION_MP3 ".mp3"
35 #define EXTENSION_AU ".au"
36 #define EXTENSION_SND ".snd"
37 #define EXTENSION_WAV ".wav"
39 #define DEFAULT_TMP_PCMA_FILE "/home/user/MyDocs/.sounds/mrec.pcma"
40 #define DEFAULT_TMP_PCMU_FILE "/home/user/MyDocs/.sounds/mrec.pcmu"
41 #define DEFAULT_TMP_FILE "/home/user/MyDocs/.sounds/mrec.raw"
42 #define DEFAULT_TMP_WAV_FILE "/home/user/MyDocs/.sounds/mrec.wav"
43 #define DEFAULT_TMP_ILBC_FILE "/home/user/MyDocs/.sounds/mrec.ilbc"
46 gboolean doSave(const gchar *tmpfile, const gchar *target, AudioFormat format);
49 gboolean openFile(const gchar *filename, AudioFormat *format, gchar **tmpfile);
51 gboolean saveFile(const gchar *filename, const gchar *tmpfile, AudioFormat format, gchar **newfile);
53 const gchar * getExtension(gint format);
55 GnomeVFSFileSize getFileLength(const gchar *file);