ho iniziato poi a smanettare e mi sono ricordato di un vecchio programma che avevo provato 4 anni fa con il mitico 6600 .. BEMUSED.
In pratica questo programma ti permette di gestire qualsiasi player multimediale del tuo pc ,tramite il cellulare, usufruendo della connessione bluetooth..
Appena scaricato ho visto che , compilando da shell, mi dava questo errore :
enigma@enigma-desktop:~/Desktop/bemusedlinuxserver1.73$ sudo make install
Password:
g++ -o bemusedlinuxserver -I/usr/include/xmms -I./ -lxmms -lbluetooth `gtk-config --libs --cflags` main.cpp BemusedServerDlg.cpp
./BemusedServerDlg.h:66: error: extra qualification ‘CBemusedServerDlg::’ on member ‘ReadFile’
./BemusedServerDlg.h:67: error: extra qualification ‘CBemusedServerDlg::’ on member ‘ReadFile’
./BemusedServerDlg.h:68: error: extra qualification ‘CBemusedServerDlg::’ on member ‘WriteFile’
./BemusedServerDlg.h:69: error: extra qualification ‘CBemusedServerDlg::’ on member ‘WriteFile’
./BemusedServerDlg.h:70: error: extra qualification ‘CBemusedServerDlg::’ on member ‘GetLastError’
./BemusedServerDlg.h:102: error: extra qualification ‘CBemusedServerDlg::’ on member ‘AddBookmarks’
BemusedServerDlg.h:66: error: extra qualification ‘CBemusedServerDlg::’ on member ‘ReadFile’
BemusedServerDlg.h:67: error: extra qualification ‘CBemusedServerDlg::’ on member ‘ReadFile’
BemusedServerDlg.h:68: error: extra qualification ‘CBemusedServerDlg::’ on member ‘WriteFile’
BemusedServerDlg.h:69: error: extra qualification ‘CBemusedServerDlg::’ on member ‘WriteFile’
BemusedServerDlg.h:70: error: extra qualification ‘CBemusedServerDlg::’ on member ‘GetLastError’
BemusedServerDlg.h:102: error: extra qualification ‘CBemusedServerDlg::’ on member ‘AddBookmarks’
make: *** [bemusedlinuxserver] Error 1
E allora per risolvere il problema ho fatto alcune modifiche.
Ecco il file corretto da compilare. Basta che lo copiate in un file nuovo e lo sostituite al vecchio BemusedServerDlg.h
#define MAX_PATH 1024
/////////////////////////////////////////////////////////////////////////////
// CDirTreeNode class
class CDirTreeNode
{
public:
CDirTreeNode();
~CDirTreeNode();
unsigned char iNodeType;
unsigned char iFileType;
char* iFileName;
bool iWrittenToBuffer;
CDirTreeNode* iParent;
CDirTreeNode* iFirstChild;
CDirTreeNode* iNextSibling;
};
/////////////////////////////////////////////////////////////////////////////
// CBemusedServerDlg dialog
class CBemusedServerDlg
{
// Construction
public:
CBemusedServerDlg(); // standard constructor
~CBemusedServerDlg();
bool OnInitDialog(bool daemonize = false);
// Implementation
private:
int BluetoothConnectToSocket(int Channel);
int BluetoothWaitforConnect(int s);
void ReadBluetoothCommand();
void HandleBluetooth();
bool CheckWinamp(const char* aWindowName);
bool ReadFile(int handle,char* buffer,int maxbytes,long unsigned int* bytesread,int* bla);
bool ReadFile(int handle,unsigned char* buffer,int maxbytes,long unsigned int* bytesread,int* bla);
bool WriteFile(int handle, char* buffer,int maxbytes, long unsigned int* byteswritten,int* bla);
bool WriteFile(int handle,unsigned char* buffer,int maxbytes, long unsigned int* byteswritten,int* bla);
char* GetLastError();
void WriteListToPhone();
void WriteDirectoryListToPhone();
void WritePlaylistToPhone();
void WriteInfoToPhone();
void WriteInf2ToPhone();
void WriteDetailedInfoToPhone();
void Play();
void PlayFile(bool aAddToPlaylist);
void GetFileInfo();
void SetSeek();
void DownloadFile();
void SetVolume();
void GetVolume();
void Version();
void SelectInPlaylist();
void RemoveAllFromPlaylist();
void Stop(bool aFadeOut);
void Pause();
void NextTrack();
void PreviousTrack();
void FastForward();
void Rewind();
void Shuffle();
void Repeat();
void ShutDown();
void Check();
void FadeOut();
void ReadIniFile();
void AddBookmarks(CDirTreeNode* aNode, CDirTreeNode* pNode, bool aRecursive);
void GenerateFileList(const char* aRoot, bool aRecursive);
void ReadDir(char* aDir, CDirTreeNode* aNode, bool aRecursive);
bool WriteNodeToBuffer(CDirTreeNode* aNode, unsigned char*& aBufferPtr, int& aSizeRemaining);
void ResetWrittenFlag(CDirTreeNode* aNode);
void Log(char* aFormatString, ...);
CDirTreeNode* iDirTreeRoot;
CDirTreeNode* iDirTreeCurrentNode;
int iCommHandle;
bool iExitNow;
bool iStopEnd;
bool iStopNow;
int startAutomatically;
char winampPath[256];
char bookmarkfile[256];
char bookmarks[100][256]; // stream URLS
char bookmarktitles[100][100]; // stream Titles
int nobookmarks;
int socket1;
int channel;
int fastforbackspeed;
char mp3Dirs[1024];
bool tcp;
int tcpport;
int lastTime;
};
[/code]
Enjoy
Nessun commento:
Posta un commento