Move C linkage binding for c++ to exporting header files instead of includes.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17609 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2008-05-22 17:51:35 +00:00
parent b2ee5bc6b6
commit 3f65a7051f
9 changed files with 51 additions and 26 deletions

View File

@ -20,6 +20,10 @@
#ifndef _IPODPATCHER_H
#define _IPODPATCHER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ipodio.h"
/* Size of buffer for disk I/O - 8MB is large enough for any version
@ -51,4 +55,8 @@ int read_aupd(struct ipod_t* ipod, char* filename);
int write_aupd(struct ipod_t* ipod, char* filename);
off_t filesize(int fd);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -24,11 +24,8 @@
#include <QtCore>
#include "rbsettings.h"
extern "C" {
// Ipodpatcher
#include "../ipodpatcher/ipodpatcher.h"
#include "../sansapatcher/sansapatcher.h"
};
class Autodetection :public QObject
{
@ -36,9 +33,9 @@ class Autodetection :public QObject
public:
Autodetection(QObject* parent=0);
void setSettings(RbSettings* sett) {settings = sett;}
bool detect();
QString getDevice() {return m_device;}

View File

@ -24,10 +24,7 @@
#include "rbsettings.h"
extern "C"
{
#include "rbspeex.h"
}
#include "rbspeex.h"
class EncBase : public QObject

View File

@ -30,11 +30,8 @@
#include "httpget.h"
#include "irivertools/irivertools.h"
extern "C" {
// Ipodpatcher
#include "../ipodpatcher/ipodpatcher.h"
#include "../sansapatcher/sansapatcher.h"
};
#include "../ipodpatcher/ipodpatcher.h"
#include "../sansapatcher/sansapatcher.h"
bool initIpodpatcher();
bool initSansapatcher();

View File

@ -29,18 +29,15 @@
#include "httpget.h"
#include "rbsettings.h"
extern "C"
{
#include "wavtrim.h"
#include "voicefont.h"
}
#include "wavtrim.h"
#include "voicefont.h"
class VoiceFileCreator :public QObject
{
Q_OBJECT
public:
VoiceFileCreator(QObject* parent=0);
//start creation
bool createVoiceFile(ProgressloggerInterface* logger);

View File

@ -20,6 +20,10 @@
#ifndef _SANSAPATCHER_H
#define _SANSAPATCHER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "sansaio.h"
/* Size of buffer for disk I/O - 8MB is large enough for any version
@ -40,4 +44,8 @@ int sansa_update_of(struct sansa_t* sansa,char* filename);
int sansa_update_ppbl(struct sansa_t* sansa,char* filename);
void sansa_list_images(struct sansa_t* sansa);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,6 +21,10 @@
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
unsigned int get_long_le(unsigned char *p);
bool get_wave_metadata(FILE *fd, int *numchan, int *bps, int *sr, int *numsamples);
bool encode_file(FILE *fin, FILE *fout, float quality, int complexity,
@ -29,6 +33,8 @@ bool encode_file(FILE *fin, FILE *fout, float quality, int complexity,
void put_ushort_le(unsigned short x, unsigned char *out);
void put_uint_le(unsigned int x, unsigned char *out);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -27,7 +27,15 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,7 +21,14 @@
#ifndef WAVTRIM_H
#define WAVTRIM_H
int wavtrim(char * filename, int maxsilence ,char* errstring,int errsize);
#ifdef __cplusplus
extern "C" {
#endif
int wavtrim(char * filename, int maxsilence ,char* errstring,int errsize);
#ifdef __cplusplus
}
#endif
#endif