Browse Source

- remove fcm/fim sources

master
vanhofen 7 years ago
parent
commit
a1b79205ae
  1. BIN
      archive-sources/FritzCallMonitor/AHA-HTTP-Interface.pdf
  2. 1
      archive-sources/FritzCallMonitor/FritzCallMonitor.addr
  3. 184
      archive-sources/FritzCallMonitor/FritzCallMonitor.cfg
  4. 893
      archive-sources/FritzCallMonitor/FritzCallMonitor.cpp
  5. 102
      archive-sources/FritzCallMonitor/FritzCallMonitor.h
  6. 7
      archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor.cfg
  7. 591
      archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor.cpp
  8. 45
      archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor.h
  9. BIN
      archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor_hint.png
  10. 1522
      archive-sources/FritzCallMonitor/FritzInfoMonitor/connect.cpp
  11. 89
      archive-sources/FritzCallMonitor/FritzInfoMonitor/connect.h
  12. 456
      archive-sources/FritzCallMonitor/FritzInfoMonitor/framebuffer.cpp
  13. 84
      archive-sources/FritzCallMonitor/FritzInfoMonitor/framebuffer.h
  14. 124
      archive-sources/FritzCallMonitor/FritzInfoMonitor/globals.h
  15. 738
      archive-sources/FritzCallMonitor/FritzInfoMonitor/icons.cpp
  16. 41
      archive-sources/FritzCallMonitor/FritzInfoMonitor/icons.h
  17. 379
      archive-sources/FritzCallMonitor/FritzInfoMonitor/parser.cpp
  18. 122
      archive-sources/FritzCallMonitor/FritzInfoMonitor/parser.h
  19. 367
      archive-sources/FritzCallMonitor/FritzInfoMonitor/phonebook.cpp
  20. 50
      archive-sources/FritzCallMonitor/FritzInfoMonitor/phonebook.h
  21. 113
      archive-sources/FritzCallMonitor/FritzInfoMonitor/rc.cpp
  22. 27
      archive-sources/FritzCallMonitor/FritzInfoMonitor/rc.h
  23. 54
      archive-sources/FritzCallMonitor/FritzInfoMonitor/starter.c
  24. 353
      archive-sources/FritzCallMonitor/FritzInfoMonitor/submenu.cpp
  25. 45
      archive-sources/FritzCallMonitor/FritzInfoMonitor/submenu.h
  26. 6
      archive-sources/FritzCallMonitor/FritzInfoMonitor_setup.cfg
  27. 548
      archive-sources/FritzCallMonitor/FritzInfoMonitor_setup.lua
  28. BIN
      archive-sources/FritzCallMonitor/FritzInfoMonitor_setup_hint.png
  29. BIN
      archive-sources/FritzCallMonitor/Technical_Note_Session_ID.pdf
  30. BIN
      archive-sources/FritzCallMonitor/Technical_Note_Session_ID_ab_OS_5.5.pdf
  31. 1132
      archive-sources/FritzCallMonitor/connect.cpp
  32. 97
      archive-sources/FritzCallMonitor/connect.h
  33. 19
      archive-sources/FritzCallMonitor/fritzcallmonitor.init
  34. BIN
      archive-sources/FritzCallMonitor/hint_FritzCallMonitor.png

BIN
archive-sources/FritzCallMonitor/AHA-HTTP-Interface.pdf

Binary file not shown.

1
archive-sources/FritzCallMonitor/FritzCallMonitor.addr

@ -1 +0,0 @@
012345|zu hause|Meinestr. 12|12345|Meinestadt|

184
archive-sources/FritzCallMonitor/FritzCallMonitor.cfg

@ -1,184 +0,0 @@
# Der Port 1012 der FRITZBox muss einmalig per Telefon (analog!) aktiviert werden:
# Telefoncode zum öffnen des TCP-Ports: #96*5*
# Telefoncode zum schließen des TCP-Ports: #96*4*
# Diese Funktion wir ab der Firmware Version xx.03.99 von AVM unterstützt.
# IP von deiner Fritzbox und port
FRITZBOXIP=fritz.box
PORT=1012
# Adressbuch Datei
ADDRESSBOOK=/var/tuxbox/config/FritzCallMonitor.addr
# Pfadangabe für den Aufruf eines Scripts.
# Nach eingehendem Anruf, kann ein Script ausgeführt werden,
# durch die z.B. die Lautstärke den Box herunter geregelt wird.
# Als Parameter wird der Inhalt der Nachricht, die auch über
# die Box ausgegeben wird, übergeben.
# Dieses Script muss natürlich vorhanden und ausführbar sein.
# Es wird per default kein Script mitgeliefert.
EXEC=
# Rückwärtssuche über das Internet
BACKWARDSEARCH=1
# Debug Ausgaben
DEBUG=0
# Neutrino Nachrichtentyp Popup (popup) oder Message (nmsg)
MSGTYPE=nmsg
# Maximale Anzeigedauer der Nachricht auf dem Bildschirm, bevor sie automatisch gelöscht wird.
# Ist hier kein Wert eingetragen, wird der Neutrino default genommen (ab Revision 1782).
MSGTIMEOUT=
# MSN Rufnummern, die überwacht werden sollen. Wenn "MSN_1" frei bleibt, werden alle Rufnummern überwacht.
# Optional kann auch der Name angegeben werden. Die Eingabe erfolgt dann <MSN>|<NAME>.
MSN_1=
#MSN_2=
#MSN_3=
#MSN_4=
#MSN_5=
#MSN_6=
# IP Adresse der Box. Die erste Adresse sollte 127.0.0.1 sein (die Box auf dem der FritzCallMonitor läuft).
# Optional kann auch der Port angegeben werden. Die Eingabe erfolgt dann <BOXIP>:<Port>. Der Standardport ist 80
BOXIP_1=127.0.0.1
#BOXIP_2=
#BOXIP_3=
#BOXIP_4=
# Name und Passwort (Name:Passwort) für das yWeb der entsprechenden Box
LOGON_1=root:coolstream
#LOGON_2=
#LOGON_3=
#LOGON_4=
# Wenn der CallMonitor in Verbindung mit einer Eeasybox eingesetzt wird "1" sonst immer "0"
EASYMODE=0
# Passwort für die !FritzBox (Achtung - nur neues Loginverfahren mit SID)
PASSWD=
# Bei der Übernahme der !FritzBox-Telefonbücher mit den FritzInfolMonitor (FIM),
# kann eine fehlende Vorwahl automatisch mit der hier eingetragenen Ortsvorwahl ergänzt werden.
CITYPREFIX=
# Wenn die Wählhilfe verwendet wird (FIM), kann hier die Wählprefix verwendet werden.
# Das Beispiel DIALPREFIX=*111# stellt eine Verbindung ins Festnetz her.
DIALPREFIX=
# Wählhilfe Ports, werden in der Auswahl des Menüs "Wählhilfe" (FIM) ausgegeben
# Name Port Intern
# ------------------------------
# "Fon 1", 1, "**1"
# "Fon 2", 2, "**2"
# "Fon 3", 3, "**3"
# "ISDN & DECT", 50, "**50"
# "ISDN 1", 51, "**51"
# "ISDN 2", 52, "**52"
# "ISDN 3", 53, "**53"
# "ISDN 4", 54, "**54"
# "ISDN 5", 55, "**55"
# "DECT 1", 610, "**610"
# "DECT 2", 611, "**611"
# "DECT 3", 612, "**612"
# "DECT 4", 613, "**613"
# "DECT 5", 614, "**614"
# "SIP 1", 620, "**620"
# "SIP 2", 621, "**621"
# "SIP 3", 622, "**622"
# "SIP 4", 623, "**623"
# "SIP 5", 624, "**624"
#
# Maximal sind 8 Einträge möglich.
# Dabei ist folgender Syntax einzuhalten:
# PORT_x=Name,Port
PORT_1=Fon 1, 1
PORT_2=Fon 2, 2
PORT_3=Fon 3, 3
PORT_4=ISDN & DECT, 50
PORT_5=ISDN 1, 51
PORT_6=ISDN 2, 52
PORT_7=DECT 1, 610
PORT_8=DECT 2, 611
# Strings zum senden an die !FritzBox, Die Quelle hierfür ist:
# http://www.wehavemorefun.de/fritzbox/index.php/Anrufliste_von_der_Box_holen
# Anrufliste (CSV) herunterladen
CALLERLIST_STR=getpage=..%2Fhtml%2Fde%2FFRITZ%21Box_Anrufliste.csv
# Speicherort für die Anrufliste auf der Coolstream
CALLERLIST_FILE=/tmp/FRITZ!Box_Anrufliste.csv
# 0 = AUS [default]
# 1 = An die FRITZ!Box wird eine Query-Abfrage gesendet
SEARCH_MODE=0
# Querystring für die Abfrage der FRITZ!Box.
# Die Abfrage, ob neue Nachrichten vorhanden sind, wurde mit der Firmware Version 29.04.87 getestet.
# In älteren Versionen scheint die FB keine Information darüber bereit zu stellen.
#
# Liefert der Query "0" zurück, wird das Flagfile (AD_FLAGFILE) gelöscht.
# Ist das Ergebnis ungleich "0", wird das Flagfile (AD_FLAGFILE) erzeugt.
# default SEARCH_QUERY=&var=tam:settings/TAM0/NumNewMessages
SEARCH_QUERY=&var=tam:settings/TAM0/NumNewMessages
# Intervall in Sekunden, für die Suchabfrage in der Startseite der FRITZ!Box
# default SEARCH_INT=300
SEARCH_INT=300
# Standard im NI-Image ist /var/etc/.call
# default AD_FLAGFILE=/var/etc/.call
AD_FLAGFILE=/var/etc/.call
#######################
## FRITZ! Smart Home ##
#######################
#
# IP und Passwort der Fritzbox, an der die SmartHome Geräte angeschlossen sind,
# Diese Adresse wird im Intervall (SEARCH_INT) abgefragt.
DECTBOXIP=
DECTPASSWD=
# DECT Tagesplan
# Schaltpunkt und Temperatur wird hier angegeben.
# In der FRITZ!Box kann für die Comet DECT Regler nur 2 Temperaturen hinterlegt werden.
# Zusätzliche Schaltpunkte und deren Temperatur können in einem Tagesplan (DP) eingetragen werden.
# Im DECT Wochenplan (WP) wird dann die Nr.x eingetragen (DPx).
# Diese Funktionsweise ist auch für die FRITZ!Dect Steckdosen anwendbar.
# So lassen sich z.B. Infrarot Heizkörper ein/abschalten wenn der Temperaturbereich stimmt.
#
# Der Wert wird in 0,5 Grad Schritten unterteilt.
# 21,5 Grad werden also als 215 eingetragen.
# Es gibt einige "besondere" Temperaturen:
# -1 es wird kein Kommando an den Aktor gesendet
# 0 schaltet den Aktor "aus"
# 1 schaltet den Aktor "ein"
#
# Die Eingabe erfolgt nach diesem Muster:
# DP[NR]=SS:MM,Temperatur; SS:MM,Temperatur; usw.
#
# DP[1]=00:00,0; 05:00,210; 08:00,190; 15:00,210; 20:00,0;
#
#
# 21° +---------+ +---------+
# : : : :
# 19° : +--------------+ :
# : : : :
# : : : :
# aus -----+ : : +--------
# 05:00 08:00 15:00 20:00
#
#
DP[11]=00:00,0; 05:00,210; 08:00,190; 15:00,210; 20:00,0;
DP[10]=00:00,-1;
# DECT Wochenplan
# Jeder Wochentag enthält den Zeitplan eines Tages DP[Nr.].
# Die DP Nummer wird im Wochenplan einem Wochentag zugewiesen.
#
# So;Mo;Di;Mi;Do;Fr;Sa;
#WP[AIN-IDs]=10;11;11:11:11;11;10;

893
archive-sources/FritzCallMonitor/FritzCallMonitor.cpp

@ -1,893 +0,0 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/socket.h>
#include <fstream>
#include <sstream>
#include <iostream>
#include <unistd.h>
#include "FritzCallMonitor.h"
#include "connect.h"
CFCM* CFCM::getInstance()
{
static CFCM* instance = NULL;
if(!instance)
instance = new CFCM();
return instance;
}
CFCM::CFCM()
{
cconnect = CConnect::getInstance();
//default parameters
FritzPort = 1012;
msgtimeout =-1;
BackwardSearch = 1;
debug = 1;
easymode = 0;
phonebooks = 1;
SearchPort = 80;
searchmode = 0;
searchint = 300;
strcpy(FritzAdr, "fritz.box");
strcpy(FritzPW, "pwd");
strcpy(msgtype, "nmsg");
strcpy(addressbook, "/var/tuxbox/config/FritzCallMonitor.addr");
strcpy(adflag, "/var/etc/.call");
strcpy(SearchAdr, "www.goyellow.de");
strcpy(searchquery, "&var=tam:settings/TAM0/NumNewMessages");
ReadConfig((char *)CONFIGFILE);
//FIXME enable this function for all config values
read_conf(CONFIGFILE);
//reinit after reading configfile
cconnect->setDebug(debug);
cconnect->setFritzAdr(FritzAdr);
cconnect->setFritzPort(80);
}
CFCM::~CFCM()
{
//
}
void CFCM::FritzCall()
{
char Buff1[BUFFERSIZE];
int sockfd = 0;
int loop = 0;
int len = 0;
int i;
char* item[MAXITEM];
while(!loop)
{
sockfd = cconnect->connect2Host(FritzAdr, FritzPort);
if (sockfd > 0) {
printf("[%s] - Socked (%i) connected to %s\n", BASENAME, sockfd, easymode?"EasyBox":"FritzBox");
loop=1;
}
else
sleep(5);
}
if(!easymode)
{
do {
bzero(Buff1, sizeof(Buff1));
if((len = recv(sockfd, Buff1, sizeof(Buff1), 0)) <= 0) {
printf("[%s] - recv error\n", BASENAME);
break;
}
#if 0
/*
* Ankommender Anruf
* 28.08.10 10:21:37;RING;2;040xxx;123x;ISDN;
* Verbunden
* 28.08.10 10:25:40;CONNECT;0;4;040xxx;
*
* Ankommender Anruf / Nummer unterdrückt
* 28.08.10 10:22:07;RING;0;;123x;ISDN;
* Verbunden
* 28.08.10 10:24:37;CONNECT;0;4;;
*
* Abgehender Anruf
* 28.08.10 10:28:48;CALL;1;4;123x;040xxx;ISDN;
*
* Getrennt
* 28.08.10 10:28:51;DISCONNECT;1;0;
*/
#endif
printf("[%s] - %s",BASENAME, Buff1);
i=0;
//item[0]="not used";
char* token = strtok(Buff1, ";");
while (token != NULL)
{
item[i+1] = token;
token = strtok(NULL, ";");
if (debug) {
if ( i != 0 )
printf("%i - %s\n", i, item[i]);
}
if (i >= MAXITEM) break;
i++;
}
if (strcmp(item[2], "RING") == 0) //incomming call
{
if ( i == 5+1) //hidden number
{
strcpy(CallFrom, "Unbekannt");
strcpy(CallTo, item[4]);
}
else
{
strcpy(CallFrom, item[4]);
strcpy(CallTo, item[5]);
}
printf("[%s] - Eingehender Anruf von %s an %s\n", BASENAME, CallFrom, CallTo);
for (i=0; i < (int)(sizeof(msnnum)/sizeof(msnnum[0])); i++)
{
if ((i==0 && strcmp(msnnum[i].msn, "") == 0) || strcmp(msnnum[i].msn, CallTo) == 0)
{
if(strlen(msnnum[i].msnName) != 0)
strcpy(CallToName,msnnum[i].msnName);
if (BackwardSearch && strcmp(CallFrom, "Unbekannt") != 0)
{
search(CallFrom);
}
else
sendMSG(0);
}
}
}
} while (loop);
}
else //EasyBox mode
{
do {
bzero(Buff1, sizeof(Buff1));
if((len = recv(sockfd, Buff1, sizeof(Buff1), 0)) <= 0) {
printf("[%s] - recv error\n",BASENAME );
break;
}
#if 0
//strcpy(Buff1,"CID: *DATE*06072011*TIME*1929*LINE**NMBR*092XXXXXXX*MESG*NONE*NAME*NO NAME*\n");
/*
* EasyBox Caller ID
*
* Ankommender Anruf
* CID: *DATE*06072011*TIME*1929*LINE**NMBR*092XXXXXXX*MESG*NONE*NAME*NO NAME*
*
* Ankommender Anruf / Nummer unterdrückt
* CID: *DATE*01072011*TIME*2007*LINE**NMBR*Privat*MESG*NONE*NAME*NO NAME*
*/
#endif
printf("[%s] - %s",BASENAME, Buff1);
char* ptr;
strcpy(CallFrom,"Unbekannt");
strcpy(CallTo,"EasyBox");
if ((ptr = strstr(Buff1, "CID:"))) //incomming call
{
if ((ptr = strstr(Buff1, "NMBR*")))
sscanf(ptr + 5, "%63[^*]", (char *) &CallFrom);
else if ((ptr = strstr(Buff1, "LINE*")))
sscanf(ptr + 5, "%63[^*]", (char *) &CallTo);
printf("[%s] - Eingehender Anruf von %s an %s\n", BASENAME, CallFrom, CallTo);
for (i=0; i < (int)(sizeof(msnnum)/sizeof(msnnum[0])); i++)
{
if ((i==0 && strcmp(msnnum[i].msn, "") == 0) || strcmp(msnnum[i].msn, CallTo) == 0)
{
if(strlen(msnnum[i].msnName) != 0)
strcpy(CallToName,msnnum[i].msnName);
if (BackwardSearch && strcmp(CallFrom, "Privat") != 0 && strcmp(CallFrom, "Unbekannt") != 0)
{
search(CallFrom);
}
else
sendMSG(0);
}
}
}
} while (loop);
}
close(sockfd);
//loop if socked lost
FritzCall();
}
int CFCM::search(const char *searchNO)
{
char *found;
char *line;
ssize_t read;
size_t len;
ostringstream url;
string output ="/tmp/fim.out";
FILE* fd;
url << SearchAdr << "/suche/" << searchNO << "/-";
memset(&address, 0, sizeof(address));
if(search_AddrBook(CallFrom)) {
sendMSG(1);
return 0;
}
string s = cconnect->post2fritz(url.str().c_str(),80 ,"", output);
line=NULL;
if((fd = fopen(output.c_str(), "r")))
{
while ((read = getline(&line, &len, fd)) != -1)
{
if ((found = strstr(line, "target=\"_self\" title=\"Zur Detailseite von&#160;")))
{
sscanf(found + 47, "%255[^\"]", (char *) &address.name);
}
else if ((found = strstr(line, "\"postalCode\" content=\"")))
{
sscanf(found + 22, "%5[^\"]", (char *) &address.code);
}
else if((found = strstr(line, "\"addressLocality\" content=\"")))
{
sscanf(found + 27, "%127[^\"]", (char *) &address.locality);
}
else if((found = strstr(line, "\"streetAddress\" content=\"")))
{
sscanf(found + 25, "%127[^\"]", (char *) &address.street);
}
}
fclose(fd);
}
if(line)
free(line);
if(strlen(address.name)!=0) {
if (debug){printf("[%s] - (%s) = %s, %s, %s %s\n",BASENAME, searchNO, address.name, address.street, address.code, address.locality);}
sendMSG(strlen(address.name));
// Save address to addressbook
add_AddrBook(CallFrom);
}
else {
printf("[%s] - no results for %s\n",BASENAME, searchNO);
}
sendMSG(0);
return 0;
}
void CFCM::sendMSG(int caller_address)
{
ostringstream msg;
ostringstream txt;
int i,j;
const char *newline="%0A";
const char *space="%20%20";
if (caller_address)
{
msg << "Anrufer : " << CallFrom << (strlen(address.name)!=0 ? newline : "")
<< space << address.name << (strlen(address.street)!=0 ? newline : "")
<< space << address.street << (strlen(address.code)!=0 ? newline : "")
<< space << address.code << address.locality << newline
<< "Leitung : " << (strlen(CallToName)!=0 ? CallToName : CallTo);
}
else
{
msg << "Anrufer : " << CallFrom << newline
<< "Leitung : " << (strlen(CallToName)!=0 ? CallToName : CallTo);
}
if(strcmp(execute,"") != 0)
{
pid_t pid;
signal(SIGCHLD, SIG_IGN);
switch (pid = vfork())
{
case -1:
perror("vfork");
break;
case 0:
printf("[%s] - Execute -> %s\n",BASENAME,execute);
if(execl("/bin/sh", "sh", execute, msg.str().c_str(), NULL))
{
perror("execl");
}
_exit (0); // terminate c h i l d proces s only
default:
break;
}
}
for (i=0; i < (int)(sizeof(msnnum)/sizeof(msnnum[0])); i++)
{
if ( (i==0 && strcmp(msnnum[0].msn, "") == 0) || strcmp(msnnum[i].msn, CallTo) == 0)
{
for (j=0; j < (int)(sizeof(boxnum)/sizeof(boxnum[0])); j++)
{
if ((strcmp(boxnum[j].BoxIP, "") != 0)) {
txt.str("");
txt << msg.str() << ' ';
char * ptr;
char ip[20];
int port = 80;
if ((ptr = strstr(boxnum[j].BoxIP, ":"))) {
sscanf(boxnum[j].BoxIP, "%19[^:]", ip);
sscanf(ptr + 1, "%i", &port);
}
else {
strcpy(ip,boxnum[j].BoxIP);
}
cconnect->get2box(ip, port, txt.str().c_str(), boxnum[j].logon, msgtype, msgtimeout);
}
}
}
}
}
int CFCM::search_AddrBook(const char *caller)
{
FILE *fd;
char *line_buffer;
string search_str;
ssize_t ptr;
size_t len;
int i=0;
if(strlen(caller)!=0){
search_str = (string) caller + "|";
} else {
return(0);
}
if(!(fd = fopen(addressbook, "r"))) {
perror(addressbook);
return(0);
}
else
{
line_buffer=NULL;
while ((ptr = getline(&line_buffer, &len, fd)) != -1)
{
i++;
if (strstr(line_buffer, search_str.c_str()))
{
sscanf(line_buffer,"%*[^|]|%255[^|]|%127[^|]|%5[^|]|%127[^|]",
(char *) &address.name,
(char *) &address.street,
(char *) &address.code,
(char *) &address.locality);
if (debug)
printf("[%s] - \"%s\" found in %s[%d]\n", BASENAME, caller, addressbook, i);
fclose(fd);
if(line_buffer)
free(line_buffer);
return(1);
}
}
if (debug)
printf("[%s] - \"%s\" not found in %s\n", BASENAME, caller, addressbook);
fclose(fd);
if(line_buffer)
free(line_buffer);
}
return(0);
}
int CFCM::add_AddrBook(const char *caller)
{
ofstream os(addressbook, ios::out | ios::app);
if (os.is_open())
{
os << caller << '|'
<< address.name << '|'
<< address.street << '|'
<< address.code << '|'
<< address.locality << '|' << endl;
os.close();
}
else
{
return(0);
}
return(1);
}
vector<string> CFCM::split(stringstream& str,const char& delim)
{
string line, cell;
vector<string> result;
while(getline(str,cell,delim))
{
result.push_back(cell);
//printf("cell=%s\n",cell.c_str());
}
return result;
}
string CFCM::create_map(string& k, const string& t, string& v, map<string, vector<string> >& m)
{
// cleanup keys with no values
if(v.empty())
{
k.clear();
return("");
}
string key;
string::size_type begin = k.find(t);
if(begin != string::npos)
{
key = k.substr(t.size());
k.erase(t.size());
// modify value
cconnect->StringReplace(v,":;,",";");
cconnect->StringReplace(v," ;\t","");
// create tmp vector
stringstream is(v);
vector<string> tmp = split(is,';');
// copy tmp vector into map
m[key].swap(tmp);
//debug
if(debug) cout << k << '[' << key << ']' << "=" << v << endl;
}
return(key);
}
string CFCM::create_map(string& k, const string& t, const string& v, map<string, string>& m)
{
if(v.empty())
{
k.clear();
return("");
}
string key;
string::size_type begin = k.find(t);
if(begin != string::npos)
{
key = k.substr(t.size());
k.erase(t.size());
m[key] = v;
//debug
cout << k << '[' << key << ']' << "=" << v << endl;
}
return(key);
}
void* CFCM::proxy_loop(void* arg)
{
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
static_cast<CFCM*>(arg)->query_loop();
return 0;
}
int CFCM::query_loop()
{
sleep(10);
while(1)
{
if(searchmode)
{
printf("[%s] - %s send query\n", BASENAME, cconnect->timestamp().c_str());
if(cconnect->get_login(FritzPW))
{
cconnect->send_TAMquery(adflag,cconnect->getSid(),searchquery);
}
}
if(!c["DECTBOXIP"].empty())
{
cconnect->setFritzAdr(c["DECTBOXIP"].c_str());
printf("[%s] - %s getdevicelistinfos %s\n", BASENAME, cconnect->timestamp().c_str(),c["DECTBOXIP"].c_str());
if(cconnect->get_login(c["DECTPASSWD"].c_str()))
{
cconnect->smartHome(cconnect->getSid(),"getdevicelistinfos");
cconnect->checkdevice(wp,dp);
cconnect->cleardevice();
}
cconnect->setFritzAdr(FritzAdr);
}
sleep(searchint);
}
return 0;
}
void CFCM::start_loop()
{
if (searchmode || !c["DECTBOXIP"].empty()) {
if(!thrTimer) {
printf("[%s] - %s Start Thread for checking FRITZ!Box (reload %i seconds)\n",BASENAME, cconnect->timestamp().c_str(), searchint);
pthread_create (&thrTimer, NULL, proxy_loop, this) ;
pthread_detach(thrTimer);
}
}
}
void CFCM::stop_loop()
{
if(thrTimer) {
printf("[%s] - %s Stop Thread for checking FRITZ!Box\n", BASENAME, cconnect->timestamp().c_str());
pthread_cancel(thrTimer);
thrTimer = 0;
}
}
int CFCM::ReadConfig(const char *fname)
{
FILE *fd_conf;
char *ptr;
char *line_buffer;
ssize_t read;
size_t len;
line_buffer=NULL;
if((fd_conf = fopen(fname, "r")))
{
while ((read = getline(&line_buffer, &len, fd_conf)) != -1)
{
char buffer[128]="";
if (line_buffer[0] == '#')
continue;
else if ((ptr = strstr(line_buffer, "DECTBOXIP="))) {
sscanf(ptr + 10, "%127s",buffer);
// FritzDectAdr=buffer;
}
else if ((ptr = strstr(line_buffer, "DECTPASSWD="))) {
sscanf(ptr + 11, "%63s", buffer);
// FritzDectPW=buffer;
}
else if ((ptr = strstr(line_buffer, "FRITZBOXIP=")))
sscanf(ptr + 11, "%63s", (char *) &FritzAdr);
else if ((ptr = strstr(line_buffer, "PORT=")))
sscanf(ptr + 5, "%i", &FritzPort);
else if ((ptr = strstr(line_buffer, "BACKWARDSEARCH=")))
sscanf(ptr + 15, "%i", &BackwardSearch);
else if ((ptr = strstr(line_buffer, "DEBUG=")))
sscanf(ptr + 6, "%i", &debug);
else if ((ptr = strstr(line_buffer, "MSGTYPE=")))
sscanf(ptr + 8, "%5s", (char *) &msgtype);
else if ((ptr = strstr(line_buffer, "MSGTIMEOUT=")))
sscanf(ptr + 11, "%i", &msgtimeout);
else if ((ptr = strstr(line_buffer, "MSN_1="))) {
sscanf(ptr + 6, "%31[^|\n]", msnnum[0].msn);
if((ptr = strstr(line_buffer, "|")))
sscanf(ptr + 1, "%63[^\n]", msnnum[0].msnName);
}
else if ((ptr = strstr(line_buffer, "MSN_2="))) {
sscanf(ptr + 6, "%31[^|\n]", msnnum[1].msn);
if((ptr = strstr(line_buffer, "|")))
sscanf(ptr + 1, "%63[^\n]", msnnum[1].msnName);
}
else if ((ptr = strstr(line_buffer, "MSN_3="))) {
sscanf(ptr + 6, "%31[^|\n]", msnnum[2].msn);
if((ptr = strstr(line_buffer, "|")))
sscanf(ptr + 1, "%63[^\n]", msnnum[2].msnName);
}
else if ((ptr = strstr(line_buffer, "MSN_4="))) {
sscanf(ptr + 6, "%31[^|\n]", msnnum[3].msn);
if((ptr = strstr(line_buffer, "|")))
sscanf(ptr + 1, "%63[^\n]", msnnum[3].msnName);
}
else if ((ptr = strstr(line_buffer, "MSN_5="))) {
sscanf(ptr + 6, "%31[^|\n]", msnnum[4].msn);
if((ptr = strstr(line_buffer, "|")))
sscanf(ptr + 1, "%63[^\n]", msnnum[4].msnName);
}
else if ((ptr = strstr(line_buffer, "MSN_6="))) {
sscanf(ptr + 6, "%31[^|\n]", msnnum[5].msn);
if((ptr = strstr(line_buffer, "|")))
sscanf(ptr + 1, "%63[^\n]", msnnum[5].msnName);
}
else if ((ptr = strstr(line_buffer, "BOXIP_1=")))
sscanf(ptr + 8, "%24s", boxnum[0].BoxIP);
else if ((ptr = strstr(line_buffer, "BOXIP_2=")))
sscanf(ptr + 8, "%24s", boxnum[1].BoxIP);
else if ((ptr = strstr(line_buffer, "BOXIP_3=")))
sscanf(ptr + 8, "%24s", boxnum[2].BoxIP);
else if ((ptr = strstr(line_buffer, "BOXIP_4=")))
sscanf(ptr + 8, "%24s", boxnum[3].BoxIP);
else if ((ptr = strstr(line_buffer, "LOGON_1=")))
sscanf(ptr + 8, "%63s", boxnum[0].logon);
else if ((ptr = strstr(line_buffer, "LOGON_2=")))
sscanf(ptr + 8, "%63s", boxnum[1].logon);
else if ((ptr = strstr(line_buffer, "LOGON_3=")))
sscanf(ptr + 8, "%63s", boxnum[2].logon);
else if ((ptr = strstr(line_buffer, "LOGON_4=")))
sscanf(ptr + 8, "%63s", boxnum[3].logon);
else if ((ptr = strstr(line_buffer, "ADDRESSBOOK=")))
sscanf(ptr + 12, "%127s", (char *) &addressbook);
else if ((ptr = strstr(line_buffer, "EASYMODE=")))
sscanf(ptr + 9, "%i", &easymode);
else if ((ptr = strstr(line_buffer, "PASSWD=")))
sscanf(ptr + 7, "%63s", (char *) &FritzPW);
else if ((ptr = strstr(line_buffer, "AD_FLAGFILE=")))
sscanf(ptr + 12, "%127s", (char *) &adflag);
else if ((ptr = strstr(line_buffer, "SEARCH_MODE=")))
sscanf(ptr + 12, "%i", &searchmode);
else if ((ptr = strstr(line_buffer, "SEARCH_QUERY=")))
sscanf(ptr + 13, "%99s", (char *) &searchquery);
else if ((ptr = strstr(line_buffer, "SEARCH_INT=")))
sscanf(ptr + 11, "%i", &searchint);
else if ((ptr = strstr(line_buffer, "CITYPREFIX=")))
sscanf(ptr + 11, "%9s", (char *) &cityprefix);
else if ((ptr = strstr(line_buffer, "EXEC=")))
sscanf(ptr + 5, "%127s", (char *) &execute);
else if ((ptr = strstr(line_buffer, "CALLERLIST_FILE=")))
sscanf(ptr + 16, "%127s", (char *) &listfile);
}
fclose(fd_conf);
}
else
{
printf("[%s] - ERROR open %s\n", BASENAME,fname);
}
if(line_buffer)
free(line_buffer);
return(0);
}
int CFCM::read_conf(const string& file)
{
fstream fh;
string s, key, value, inx;
// clean table for reload
c.clear();
wp.clear();
dp.clear();
fh.open(file.c_str(), ios::in);
if(!fh.is_open())
{
cout << "Error reading configfile \"" << file << "\"" << endl;
return 1;
}
while (getline(fh, s))
{
string::size_type begin = s.find_first_not_of(" \f\t\v");
// skip blank lines
if (begin == string::npos)
continue;
// skip commentary
if (string("#;").find(s[begin]) != string::npos)
continue;
// extract the key value
string::size_type end = s.find('=', begin);
// skip lines without "="
if (end == string::npos)
continue;
key = s.substr(begin, end - begin);
// trim key
//key.erase(key.find_last_not_of(" \f\t\v") + 1);
cconnect->StringReplace(key," ;[;];\f;\t;\v", "");
// skip blank keys
if (key.empty())
continue;
// extract and trim value
begin = s.find_first_not_of(" \f\n\r\t\v", end);
end = s.find_last_not_of(" \f\n\r\t\v") + 1;
value = s.substr(begin + 1, end - begin);
cconnect->StringReplace(value," ;[;];\f;\t;\v", "");
// *** special maps ***
// create map for Comet temp
inx = create_map(key, "DP", value, dp);
if(!inx.empty())
continue;
// create map for Comet week
inx = create_map(key, "WP", value, wp);
if(!inx.empty())
continue;
// *** config map ***
// create map for config
if(!key.empty()) {
c[key] = value;
//debug
//cout << key << "=" << value << endl;
}
}
fh.close();
return 0;
}
void Usage()
{
printf("[%s] - FritzBox-Anrufmonitor %s %s\n\n", BASENAME, VERSION, COPYR);;
printf("\t\tUSAGE:\t%s\n", BASENAME);
printf("\t\t\t-c\t\t\tget callerlist (FRITZ!Box_Anrufliste.csv)\n");
printf("\t\t\t-h\t\t\tshow help\n");
printf("\t\t\t-q\t\t\tsend query to FRITZ!Box\n");
printf("\t\t\t-m\t\t\tsend message to BOXIP_1\n");
printf("\t\t\t-s\t\t\tget smart Home infos\n");
printf("\t\t\t-t [phonenumber] [MSN]\ttest backward search\n");
}
int main(int argc, char *argv[])
{
CFCM * cfcm = CFCM::getInstance();
cfcm->run(argc,argv);
}
int CFCM::run(int argc, char *argv[])
{
printf("\n[%s] - NI FRITZ!Box-Anrufmonitor %s - %s\n", BASENAME, VERSION, COPYR);
if(strlen(msnnum[0].msn)==0)
printf("[%s] - Listening to all MSN's\n", BASENAME);
else {
for (int i=0; i < (int)(sizeof(msnnum)/sizeof(msnnum[0])); i++) {
if(strlen(msnnum[i].msn)!=0) {
cout << '[' << BASENAME << "] - Listening to MSN " << msnnum[i].msn <<
(strlen(msnnum[i].msnName)!=0 ? " (" : "") <<
(strlen(msnnum[i].msnName)!=0 ? msnnum[i].msnName : "") <<
(strlen(msnnum[i].msnName)!=0 ? ")" : "") << endl;
}
}
}
switch (argc)
{
case 1:
if(searchmode || !c["DECTBOXIP"].empty())
start_loop();
FritzCall();
return 0;
case 2:
if (strstr(argv[1], "-h"))
{
Usage();
break;
}
else if (strstr(argv[1], "-b"))
{
switch(fork())
{
case 0:
if(searchmode || !c["DECTBOXIP"].empty())
start_loop();
FritzCall();
break;
case -1:
printf("[%s] - Aborted!\n", BASENAME);
return -1;
default:
exit(0);
}
}
else if (strstr(argv[1], "-c"))
{
printf("[%s] - get FRITZ!Box_Anrufliste.csv from FritzBox\n", BASENAME);
if(!cconnect->get_login(FritzPW)) {
exit(1);
}
//cconnect->send_refresh(cconnect->sid);
cconnect->get_callerlist(cconnect->getSid(),listfile);
cconnect->send_logout(cconnect->getSid());
exit(0);
}
else if (strstr(argv[1], "-q"))
{
printf("[%s] - %s send query 2 FritzBox\n", BASENAME, cconnect->timestamp().c_str());
if(!cconnect->get_login(FritzPW)) {
exit(1);
}
cconnect->send_TAMquery(adflag,cconnect->getSid(),searchquery);
exit(0);
}
else if (strstr(argv[1], "-m"))
{
cconnect->get2box(boxnum[0].BoxIP, 80, "FritzCallMonitor Testmessage", boxnum[0].logon, msgtype, msgtimeout);
return 0;
}
else if (strstr(argv[1], "-s"))
{
printf("[%s] - get smart Home infos from FritzBox\n", BASENAME);
cconnect->setFritzAdr(c["DECTBOXIP"].c_str());
if(!cconnect->get_login(c["DECTPASSWD"].c_str())) {
cconnect->setFritzAdr(FritzAdr);
exit(1);
}
// fill vector with device infos
cconnect->smartHome(cconnect->getSid(),"getdevicelistinfos");
cconnect->checkdevice(wp,dp);
// delete device vector
cconnect->cleardevice();
cconnect->setFritzAdr(FritzAdr);
exit(0);
}
else
{
Usage();
exit(1);
}
case 4:
if (strstr(argv[1], "-t"))
{
printf("[%s] - serarch for %s\n", BASENAME, argv[2]);
strcpy(CallFrom, argv[2]);
strcpy(CallTo, argv[3]);
search(CallFrom);
return 0;
}
default:
Usage();
exit(1);
}
return(0);
}

102
archive-sources/FritzCallMonitor/FritzCallMonitor.h

@ -1,102 +0,0 @@
/*
* FritzCallMonitor.h
*/
#ifndef __FritzCallMonitor_h__
#define __FritzCallMonitor_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <vector>
#include <map>
#include "connect.h"
#define BASENAME "FCM"
#define VERSION "V5.1"
#define COPYR "2010, 2017 (c) FlatTV"
#define BUFFERSIZE 1024
#define MAXITEM 10
#define CONFIGFILE "/var/tuxbox/config/FritzCallMonitor.cfg"
using namespace std;
class CFCM
{
public:
CFCM();
~CFCM();
static CFCM* getInstance();
int run(int argc, char *argv[]);
private:
CConnect * cconnect;
pthread_t thrTimer;
vector<string> dect;
map<string, string> c; // config pair
map<string, vector<string> > dp; // DECT time and temperatur
map<string, vector<string> > wp; // DECT week
typedef struct {
char name[256];
char street[128];
char code[6];
char locality[128];
} S_ADDRESS;
S_ADDRESS address;
typedef struct {
char BoxIP[25];
char logon[64];
} S_BOXNUM;
S_BOXNUM boxnum[4];
typedef struct {
char msn[32];
char msnName[64];
} S_MSNNUM;
S_MSNNUM msnnum[6];
// string FritzDectAdr;
// string FritzDectPW;
char FritzAdr[64];
char FritzPW[64];
char msgtype[6];
char addressbook[128];
char execute[128];
char cityprefix[10];
char adflag[128];
char CallFrom[64];
char CallTo[64];
char CallToName[64];
char SearchAdr[20];
char searchquery[100];
char listfile[128];
int debug, BackwardSearch, msgtimeout,easymode, phonebooks;
int FritzPort, SearchPort, searchmode, searchint;
//global functions
void FritzCall();
void sendMSG(int caller_address);
int search(const char *searchNO);
int ReadConfig(const char *fname);
int read_conf(const string& file); //FIXME enable this function for all values
int add_AddrBook(const char *caller);
int search_AddrBook(const char *caller);
string create_map(string& k, const string& t, string& v, map<string, vector<string> >& m);
string create_map(string& k, const string& t, const string& v, map<string, string>& m);
//query thread
static void* proxy_loop(void *arg);
void start_loop();
void stop_loop();
int query_loop();
vector<string> split(stringstream& str, const char& delim);
};
#endif// __FritzCallMonitor_h__

7
archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor.cfg

@ -1,7 +0,0 @@
type=2
name=NI-FRITZ! Info Monitor
desc=FRITZ!Box Informationen
needfb=1
needlcd=0
needrc=1
needoffsets=1

591
archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor.cpp

@ -1,591 +0,0 @@
#include <sstream>
#include <fcntl.h>
#include <unistd.h>
#include "parser.h"
#include "connect.h"
#include "framebuffer.h"
#include "rc.h"
#include "icons.h"
#include "submenu.h"
#include "phonebook.h"
#include "globals.h"
#include "FritzInfoMonitor.h"
CFIM* CFIM::getInstance()
{
static CFIM* instance = NULL;
if(!instance)
instance = new CFIM();
return instance;
}
CFIM::CFIM()
{
cpars = CParser::getInstance();
cconnect = CConnect::getInstance();
cfb = Cfb::getInstance();
crc = Crc::getInstance();
cicons = CIcons::getInstance();
startitem=0, perpage=MAXCALLER, repaint=1, callsel=0, rs_result=0, dialtest=1;
cfb->init();
cfb->getDimensions(&ex, &sx, &ey, &sy);
cfb->getStartDimensions(&startx, &starty);
};
CFIM::~CFIM()
{
Cleanup();
}
/******************************************************************************
* Mainmenu
******************************************************************************/
void CFIM::Mainmenu(int init)
{
printf("[%s] - %s(%d)\n",BASENAME, __FUNCTION__, init);
int bspace = 40;
int lrspace = 30;
int vsx = bspace + lrspace;
int vsy = 80;
int breite = ex-sx - bspace;
int tiefe = ey-sy - bspace;
int zeilenabstand = cfb->getYScreeninfo() < 600 ? 25 : 28;
std::ostringstream txt;
int sp1 = vsx+30;
int le1 = 140; //Datum
int sp2 = sp1+le1+18;
int le2 = 180; //Name
int sp3 = sp2+le2+18;
int le3 = 180; //Rufnummer
int sp4 = sp3+le3+18;
int le4 = 180; //Telefoniegerät
int sp5 = sp4+le4+18;
int le5 = 140; //Eigene Nummer
int sp6 = sp5+le5+18;
int le6 = 60; //Dauer
// Grafikausgabe
cfb->RenderBox(bspace, 0, breite, tiefe, FILL, CMC);
cfb->RenderBox(bspace, 0, breite, 40, FILL, CMH);
cfb->PaintIcon(cicons->getIcon_ni(),((breite+bspace)/2)-(120/2)-35,8);
cfb->RenderString("FRITZ! Info", ((breite+bspace)/2)-(120/2) ,30, 120, CENTER, BIG, CMHT);
// Footer
cfb->RenderBox(bspace, tiefe, breite, tiefe+30, FILL, CMH);
cfb->RenderCircle( vsx, tiefe+6, RED);
cfb->RenderString("Menü", sp1, tiefe+20, 100, LEFT, SMALL, GREY);
cfb->PaintIcon(cicons->getIcon_right(), sp2, tiefe);
if(startitem > 0)
cfb->PaintIcon(cicons->getIcon_left(), sp2+20, tiefe);
cfb->RenderString("Anrufliste", startitem > 0 ? sp2+20+30 : sp2+30, tiefe+20, 150, LEFT, SMALL, GREY);
cfb->PaintIcon(cicons->getIcon_help(), sp3, tiefe);
cfb->RenderString("Info", sp3+30, tiefe+20, 100, LEFT, SMALL, GREY);
if(init == LOGIN)
{
vsy += zeilenabstand;
cfb->RenderString("Sende Login ...", vsx, vsy, 200, LEFT, NORMAL, CMCT);
}
else if(!init || init == CINFO)
{
txt.str("");
txt << "Firmware: " << cpars->getNspver();
cfb->RenderString(txt.str().c_str(), breite-200-lrspace, vsy-7, 200, RIGHT, SMALL, GREY);
vsy += zeilenabstand;
cfb->RenderString("Komfortinfo", vsx ,vsy, 200, LEFT, NORMAL, CMHT);
vsy += zeilenabstand+7;
txt.str("");
txt << "Anrufbeantworter: " << (atoi(cpars->getTam0_active().c_str())?"Aktiv, ":"Inaktiv, ") << (atoi(cpars->getTam0_NumNewMessages().c_str())) << " neue Nachrichten";
cfb->RenderString(txt.str().c_str(), vsx, vsy, breite-vsx-lrspace, LEFT, NORMAL, CMCT);
vsy += zeilenabstand;
char str[30];
switch(atoi(cpars->getDdns_state().c_str()))
{
case 0: strcpy(str,"Fehler") ;break;
case 3: strcpy(str,"Anmeldung") ;break;
case 5: strcpy(str,"Angemeldet") ;break;//Erfolgreich angemeldet
case 97: strcpy(str,"Account deaktiviert") ;break;
case 98: strcpy(str,"Internet nicht verbunden") ;break;
case 99: strcpy(str,"Unbekannt") ;break;
default: strcpy(str,"Anmeldung läuf") ;break;
}
string ddns_domain = cpars->getDdns_domain();
int ddns_state = atoi(cpars->getDdns_state().c_str());
txt.str("");
txt << "Dynamic DNS: " << str << (ddns_domain.empty() ? " " : ", ") << (ddns_state ==0 ? cpars->getPppoe_ip() : ddns_domain);
cfb->RenderString(txt.str().c_str(), vsx, vsy, breite-vsx-lrspace, LEFT, NORMAL, CMCT);
vsy += zeilenabstand;
}
if(!init)
{
int i=0;
vsy += zeilenabstand;
int csy = vsy;
if(breite > (sp4+le4)) cfb->RenderString("Telefoniegerät", sp4, vsy, le4, LEFT, NORMAL, CMHT);
if(breite > (sp5+le5)) cfb->RenderString("Eigene Nummer", sp5, vsy, le5, LEFT, NORMAL, CMHT);
if(breite > (sp6+le6)) cfb->RenderString("Dauer", sp6, vsy, le6, LEFT, NORMAL, CMHT);
vsy += 7;
if(callsel > perpage-1)
callsel=0;
else if(callsel < 0)
callsel=perpage-1;
unsigned mystart = vsy+zeilenabstand;
unsigned vsi = zeilenabstand;
for (i=0; i < MAXCALLER; i++)
{
vsy += zeilenabstand;
//selected;
if(callsel==i)
cfb->RenderBox(bspace, mystart+((callsel-1)*vsi+2), breite, mystart+(callsel*vsi+5), FILL, CMHT);
cfb->PaintIcon(atoi(cpars->caller[i].call_type)==1?cicons->getIcon_phone1():atoi(cpars->caller[i].call_type)==2?cicons->getIcon_phone2():cicons->getIcon_phone3(),vsx,vsy-23);
cfb->RenderString(cpars->caller[i].call_date, sp1, vsy, le1, LEFT, NORMAL, callsel==i?CMC:CMCT);
if(strlen(cpars->caller[i].call_name)==0 && strlen(cpars->caller[i].call_numr)!=0) {
if(cpars->search_AddrBook(cpars->caller[i].call_numr)) {
strcpy(cpars->caller[i].call_name,cpars->address.name);
cpars->init_address();
}
else
strcpy(cpars->caller[i].call_name,"nicht gefunden");
}
if(strlen(cpars->caller[i].call_numr)==0)
strcpy(cpars->caller[i].call_name,"unbekannt");
cfb->RenderString(cconnect->UTF8toISO(cpars->caller[i].call_name)/*txt*/, sp2, vsy, le2, LEFT, NORMAL, callsel==i?CMC:CMCT);
cfb->RenderString((strlen(cpars->caller[i].call_numr)==0 ? "keine Rufnummer" : cpars->caller[i].call_numr), sp3, vsy, le3, LEFT, NORMAL, callsel==i?CMC:CMCT);
if(breite > (sp4+le4))
{
cfb->RenderString(cpars->caller[i].port_name, sp4, vsy, le4, LEFT, NORMAL, callsel==i?CMC:CMCT);
}
if(breite > (sp5+le5))
{
cfb->RenderString(cpars->caller[i].port_rout, sp5, vsy, le5, LEFT, NORMAL, callsel==i?CMC:CMCT);
}
if(breite > (sp6+le6))
{
cfb->RenderString(cpars->caller[i].call_time, sp6, vsy, le6, LEFT, NORMAL, callsel==i?CMC:CMCT);
}
if(vsy >= tiefe-50)
{
// RenderString("----", sp1, vsy, le1, LEFT, NORMAL, CMHT);
perpage = i+1;
break;
}
}
txt.str("");
txt << "Anrufe " << startitem+1 << " bis " << startitem+perpage;
cfb->RenderString(txt.str().c_str(), vsx, csy, 300, LEFT, NORMAL, CMHT);
}
else if (init==2)
{
vsy += zeilenabstand;
cfb->RenderString("Anrufe", vsx, vsy, 700, LEFT, NORMAL, CMHT);
vsy += 7;
vsy += zeilenabstand;
cfb->RenderString("Hole Daten von der FRITZ!Box ...", vsx, vsy, 306, LEFT, NORMAL, CMCT);
}
cfb->FBPaint();
}
/******************************************************************************
* ShowMessage
******************************************************************************/
void CFIM::ShowMessage(int message, int popup)
{
CSubMenu::getInstance()->ShowMessage(message, popup);
if(!popup)
{
unsigned short rccode;
while(((rccode=crc->getrc())!=RC_HOME) && (rccode!=RC_OK));
if(message == INFO) {
Mainmenu(REPAINT);
}
else if(message == INFO_DIALTEST) {
Mainmenu(REPAINT);
}
else {
Cleanup();
exit(1);
}
}
}
/******************************************************************************
* ShowMenu (submenu)
******************************************************************************/
void CFIM::ShowMenu(int menu)
{
printf("[%s] - %s(%d)\n",BASENAME, __FUNCTION__, menu);
//show menu
switch(menu)
{
case MENU:
case PHONEBOOK:
CSubMenu::getInstance()->ShowSubMenu(menu);
break;
case DIAL:
CSubMenu::getInstance()->DialMenu(dialtest);
break;
case CALLER_DETAILS:
CSubMenu::getInstance()->CallerMenu(rs_result, callsel);
break;
}
//get rc code
unsigned short rccode;
do
{
switch((rccode = crc->getrc()))
{
case RC_UP:
CSubMenu::getInstance()->subMenu[menu].sel--;
ShowMenu(menu);
rccode=RC_HOME;
break;
case RC_DOWN:
CSubMenu::getInstance()->subMenu[menu].sel++;
ShowMenu(menu);
rccode=RC_HOME;
break;
case RC_OK:
DoExec(menu);
break;
case RC_HOME:
switch(menu)
{
case MENU:
Mainmenu(REPAINT);
break;
case DIAL:
case PHONEBOOK:
cfb->FBClear();
ShowMenu(MENU);
break;
}
break;
case RC_RED:
switch(menu)
{
case MENU:
cfb->FBClear();
ShowMenu(PHONEBOOK);
break;
case CALLER_DETAILS:
dialtest=0;
ShowMenu(DIAL);
break;
}
rccode=RC_HOME;
break;
case RC_GREEN:
cfb->FBClear();
ShowMenu(DIAL);
rccode=RC_HOME;
break;
case RC_YELLOW:
switch(menu)
{
case CALLER_DETAILS:
if(rs_result)
DoExec(ADDADR);
break;
case MENU:
DoExec(RECONNECT);
break;
}
rccode=RC_HOME;
break;
case RC_BLUE:
switch(menu)
{
case MENU:
DoExec(REFRESHCALL);
break;
case CALLER_DETAILS:
DoExec(RSEARCH);
break;
}
rccode=RC_HOME;
break;
case RC_1:
DoExec(ADDRESSBOOK);
rccode=RC_HOME;
break;
}
}
while(rccode!=RC_HOME && rccode!=RC_OK);
}
/******************************************************************************
* DoExec
******************************************************************************/
void CFIM::DoExec(int function)
{
printf("[%s] - %s(%d)\n",BASENAME, __FUNCTION__, function);
std::ostringstream txt;
int queryLogic = cconnect->getQueryLogic();
const char* sid = cconnect->getSid();
switch(function)
{
/*0*/
case MENU:
switch(CSubMenu::getInstance()->subMenu[MENU].sel)
{
//select from submenu
case 0:
cfb->FBClear();
ShowMenu(PHONEBOOK);
break;
case 1:
cfb->FBClear();
ShowMenu(DIAL);
break;
case 2:
DoExec(RECONNECT);
break;
case 3:
DoExec(REFRESHCALL);
break;
case 4:
DoExec(ADDRESSBOOK);
break;
}
break;
/*1*/
case PHONEBOOK:
ShowMessage(INFO_PHONEBOOK,1);
cconnect->get_login(cpars->getFritzPW());
cconnect->get_phonebooks(sid,CSubMenu::getInstance()->subMenu[PHONEBOOK].sel);
if(queryLogic==1)
cconnect->send_logout(sid);
cfb->FBClear();
ShowMenu(PHONEBOOK);
break;
/*2*/
case CALLER_DETAILS:
// nothing to do, SubMenu only
break;
/*3*/
case DIAL:
cconnect->get_login(cpars->getFritzPW());
if(dialtest) {
txt.str("");
txt << "**" << cpars->dialport[CSubMenu::getInstance()->subMenu[DIAL].sel].port;
cconnect->dial(sid,50,txt.str().c_str());
ShowMessage(INFO_DIALTEST,0);
cconnect->hangup(sid, cpars->dialport[CSubMenu::getInstance()->subMenu[DIAL].sel].port);
}
else {
cfb->FBClear();
ShowMessage(INFO_DIAL,1);
txt.str("");
txt << cpars->getDialprefix() << cpars->caller[callsel].call_numr;
cconnect->dial(sid,cpars->dialport[CSubMenu::getInstance()->subMenu[DIAL].sel].port, txt.str().c_str());
sleep(3);
dialtest=1;
}
if(queryLogic==1)
cconnect->send_logout(sid);
break;
/*4*/
case RECONNECT:
cconnect->get_login(cpars->getFritzPW());
cconnect->reconnect(sid);
ShowMessage(INFO_RECONNECT,0);
if(queryLogic==1)
cconnect->send_logout(sid);
break;
/*5*/
case REFRESHCALL:
startitem = 0;
perpage = MAXCALLER;
ShowMessage(LOAD,1);
cconnect->get_login(cpars->getFritzPW());
cconnect->send_query_info(sid);
Mainmenu(CINFO);
cconnect->send_refresh(sid);
cconnect->send_query_caller(sid, startitem, MAXCALLER);
Mainmenu(REPAINT);
if(queryLogic==1)
cconnect->send_logout(sid);
break;
/*6*/
case ADDADR:
cpars->add_AddrBook(cpars->caller[callsel].call_numr);
ShowMessage(INFO_ADDADR,1);
sleep(3);
break;
/*7*/
case RSEARCH:
if((rs_result = cconnect->rsearch(cpars->caller[callsel].call_numr))) {
ShowMenu(CALLER_DETAILS);
strcpy(cpars->caller[callsel].call_name,cpars->address.name);
cpars->init_address();
rs_result=0;
}
else {
ShowMessage(INFO_RSEARCH,1);
sleep(3);
}
Mainmenu(REPAINT);
break;
/*8*/
case ADDRESSBOOK:
CPhoneBook::getInstance()->run();
Mainmenu(REPAINT);
break;
}
}
/******************************************************************************
* Cleanup
******************************************************************************/
void CFIM::Cleanup (void)
{
cfb->Cleanup();
crc->Cleanup();
unlink(cpars->getListfile());
printf("[%s] - bye\n",BASENAME);
}
/******************************************************************************
* plugin_exec
******************************************************************************/
int main(int argc, char *argv[])
{
return CFIM::getInstance()->run(argc, argv);
}
//void plugin_exec(PluginParam *par)
int CFIM::run(int argc, char *argv[])
{
printf("[%s] - Version %s\n", BASENAME, VERSION);
if(cpars->ReadConfig(CONFIGFILE)) {
Cleanup();
exit(1);
}
//reinit after reading configfile
cconnect->setDebug(cpars->getDebug());
cpars->ReadColors(NEUTRINOCONF);
// lock keyboard-conversions, this is done by the plugin itself
//fclose(fopen(KBLCKFILE,"w"));
Mainmenu(LOGIN);
int query = cconnect->get_login(cpars->getFritzPW());
if(!query) {
printf("[%s] - ERROR get_login\n", BASENAME);
ShowMessage(ERR_LOGIN,0);
Cleanup();
exit(1);
}
const char* sid = cconnect->getSid();
int queryLogic = cconnect->getQueryLogic();
cconnect->send_query_info(sid);
Mainmenu(CINFO);
cconnect->send_refresh(sid);
cconnect->send_query_caller(sid, 0, MAXCALLER);
Mainmenu(REPAINT);
if(query==1)
cconnect->send_logout(sid);
unsigned short rccode;
do
{
switch((rccode = crc->getrc()))
{
case RC_HELP:
ShowMessage(INFO,0);
break;
case RC_RED:
cfb->FBClear();
ShowMenu(MENU);
break;
case RC_LEFT:
if(startitem == 0)
break;
startitem -= perpage;
if(startitem<0)
startitem=0;
callsel=0;
ShowMessage(LOAD,1);
cconnect->get_login(cpars->getFritzPW());
cconnect->send_query_caller(sid, startitem, perpage);
Mainmenu(REPAINT);
if(queryLogic==1)
cconnect->send_logout(sid);
break;
case RC_RIGHT:
startitem += perpage;
callsel=0;
ShowMessage(LOAD,1);
cconnect->get_login(cpars->getFritzPW());
cconnect->send_query_caller(sid, startitem,perpage);
Mainmenu(REPAINT);
if(queryLogic==1)
cconnect->send_logout(sid);
break;
case RC_DOWN:
callsel++;
Mainmenu(REPAINT);
break;
case RC_UP:
callsel--;
Mainmenu(REPAINT);
break;
case RC_OK:
cpars->search_AddrBook(cpars->caller[callsel].call_numr);
ShowMenu(CALLER_DETAILS);
cpars->init_address();
Mainmenu(REPAINT);
break;
}
}
while(rccode != RC_HOME);
Cleanup();
return 0;
}

45
archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor.h

@ -1,45 +0,0 @@
#ifndef __FritzInfoMonitor_h__
#define __FritzInfoMonitor_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
class CFIM
{
public:
CFIM();
~CFIM();
static CFIM* getInstance();
int run(int argc, char *argv[]);
private:
CConnect * cconnect;
CParser * cpars;
Cfb * cfb;
Crc * crc;
CIcons * cicons;
enum MAINMENU_INIT
{
REPAINT,
LOGIN,
CINFO,
};
int startx, starty, sx, ex, sy, ey;
void Cleanup(void);
void DoExec(int function);
// grafische Funktionen
void Mainmenu(int init);
void ShowMessage(int message, int popup);
void ShowMenu(int menu);
int startitem, perpage, repaint, callsel, rs_result, dialtest;
};
#endif// __FritzInfoMonitor_h__

BIN
archive-sources/FritzCallMonitor/FritzInfoMonitor/FritzInfoMonitor_hint.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

1522
archive-sources/FritzCallMonitor/FritzInfoMonitor/connect.cpp

File diff suppressed because it is too large

89
archive-sources/FritzCallMonitor/FritzInfoMonitor/connect.h

@ -1,89 +0,0 @@
#ifndef __connect_h__
#define __connect_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
class CConnect
{
public:
CConnect();
~CConnect();
static CConnect* getInstance();
int connect2Host(const char *adr, int port);
int get2box(const char* host, int port, const char* msg, const char* upwd);
int get_login(const char* fritzPW);
int get_callerlist(const char *sid, const char *file);
int get_phonebooks(const char *sid, int phonebook);
int get_phonebooks_LUA(const char *sid, int phonebook);
int send_refresh(const char *sid);
int send_logout(const char *sid);
int send_query(const char* flag, const char *sid, const char *searchstr);
int send_query_caller(const char *sid, int s, int max);
int send_query_info(const char *sid);
int rsearch(const char *searchNO);
int dial(const char *sid, int port, const char *number);
int reconnect(const char *sid);
int hangup(const char *sid, int port);
char *trim(char *txt);
char *UTF8toISO(char *txt);
void log(const int& dlevel, const char *ftxt,...);
void StringReplace(string &str, const string search, const string rstr);
std::string query2fritz(const char* command);
virtual int getQueryLogic(){return query_logic;};
virtual void setDebug(const int Debug){debug = Debug;};
virtual const char* getSid(){return sid;};
private:
CParser * cpars;
FILE *r_fritz;
FILE *w_fritz;
int sockfb;
int debug;
int query_logic;
int loginLUA;
char sid[20];
char challenge[20];
vector<string> multipart;
string timestamp();
string basename;
unsigned char digest[16];
unsigned char md5sum[33];
int connect2fritz();
int quitfritz();
int get_challenge(bool lua = true);
int get_md5(const char *challenge, char *fritzPW);
int get_sid(const char *challenge, const unsigned char *md5);
int get_sid_LUA(const char *challenge, const unsigned char *md5);
int get_caller_LUA(const char *sid, int s, int max);
int get_challenge(const char* host, int port,const char* fritzPW);
std::string post2fritz(const char* url, const std::string data, const std::string curlOutFile = "");
int get_OLDquery_logic(const char *sid, int logic);
///get Infos from FB with query.lua
int get_QueryInfos(const char *sid);
//FritzInfoMonitor
//Firmware < xx.04.74 without SID
int send_old_login(const char *fritzPW);
int ExistFile(const char *fname);
int TouchFile(const char *fname);
//FIXME void init_caller();
//FIXME void init_address();
///query syntax
int get_query_logic(const char *sid, int logic);
void get_query_version(const char *sid);
};
#endif //__connect_h__

456
archive-sources/FritzCallMonitor/FritzInfoMonitor/framebuffer.cpp

@ -1,456 +0,0 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include "parser.h"
#include "globals.h"
#include "framebuffer.h"
const char circle[]={
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,1,1,1,1,1,1,1,1,1,1,1,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
};
Cfb* Cfb::getInstance()
{
static Cfb* instance = NULL;
if(!instance)
instance = new Cfb();
return instance;
}
Cfb::Cfb()
{
cpars = CParser::getInstance();
memset(&lfb, 0, sizeof(lfb));
memset(&lbb, 0, sizeof(lbb));
}
Cfb::~Cfb()
{
Cleanup();
}
int Cfb::init()
{
FT_Error error;
fb = sx = ex = sy = ey = -1;
// open Framebuffer
fb=open ( "/dev/fb/0", O_RDWR );
// init framebuffer
if(ioctl(fb, FBIOGET_FSCREENINFO, &fix_screeninfo) == -1)
{
printf("[%s] <FBIOGET_FSCREENINFO failed>\n",BASENAME);
return(2);
}
if(ioctl(fb, FBIOGET_VSCREENINFO, &var_screeninfo) == -1)
{
printf("[%s] <FBIOGET_VSCREENINFO failed>\n",BASENAME);
return(2);
}
if(!(lfb = (unsigned char*)mmap(0, fix_screeninfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0)))
{
printf("[%s] <mapping of Framebuffer failed>\n",BASENAME);
return(2);
}
// init fontlibrary
if((error = FT_Init_FreeType(&library)))
{
printf("[%s] <FT_Init_FreeType failed with Errorcode 0x%.2X>",BASENAME, error);
munmap(lfb, fix_screeninfo.smem_len);
return(2);
}
if((error = FTC_Manager_New(library, 1, 2, 0, &MyFaceRequester, this, &manager)))
{
printf("[%s] <FTC_Manager_New failed with Errorcode 0x%.2X>\n",BASENAME, error);
FT_Done_FreeType(library);
munmap(lfb, fix_screeninfo.smem_len);
return(2);
}
if((error = FTC_SBitCache_New(manager, &cache)))
{
printf("[%s] <FTC_SBitCache_New failed with Errorcode 0x%.2X>\n",BASENAME, error);
FTC_Manager_Done(manager);
FT_Done_FreeType(library);
munmap(lfb, fix_screeninfo.smem_len);
return(2);
}
if((error = FTC_Manager_Lookup_Face(manager, (char *)FONT, &face)))
{
printf("[%s] <FTC_Manager_Lookup_Face failed with Errorcode 0x%.2X>\n",BASENAME, error);
FTC_Manager_Done(manager);
FT_Done_FreeType(library);
munmap(lfb, fix_screeninfo.smem_len);
return(2);
}
use_kerning = FT_HAS_KERNING(face);
desc.face_id = (char *)FONT;
desc.flags = FT_LOAD_MONOCHROME;
// init backbuffer
if(!(lbb = (unsigned char*)malloc(fix_screeninfo.line_length*var_screeninfo.yres)))
{
printf("[%s] <allocating of Backbuffer failed>\n",BASENAME);
FTC_Manager_Done(manager);
FT_Done_FreeType(library);
munmap(lfb, fix_screeninfo.smem_len);
return(2);
}
// volle Bildschirmauflösung reservieren (Parameter: buffer, color, size in bytes)
memset(lbb, 0, fix_screeninfo.line_length*var_screeninfo.yres);
printf("[%s] - init: FB %dx%dx%d stride %d\n",BASENAME, var_screeninfo.xres, var_screeninfo.yres, var_screeninfo.bits_per_pixel, fix_screeninfo.line_length);;
cpars->read_neutrino_osd_conf(&ex,&sx,&ey,&sy,NEUTRINOCONF);
if((ex == -1) || (sx == -1) || (ey == -1) || (sy == -1))
{
sx = 80;
ex = var_screeninfo.xres - 80;
sy = 80;
ey = var_screeninfo.yres - 80;
}
int mwidth = ex-sx;
int mheight = ey-sy;
//mwidth = 620;
startx = sx + (((ex-sx) - mwidth)/2);
starty = sy + (((ey-sy) - mheight)/2);
//vyres = var_screeninfo.yres;
return(0);
}
/******************************************************************************
* MyFaceRequester
******************************************************************************/
FT_Error Cfb::MyFaceRequester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *aface)
{
FT_Error result;
result = FT_New_Face(library, (char *)face_id, 0, aface);
if(!result)
{
printf("[%s] - <Font \"%s\" loaded>\n",BASENAME, (char*)face_id);
}
else
{
printf("[%s] <Font \"%s\" failed>\n",BASENAME, (char*)face_id);
}
return result;
}
/******************************************************************************
* RenderChar
******************************************************************************/
int Cfb::RenderChar(FT_ULong currentchar, int sx, int sy, int ex, int color)
{
int row, pitch, bit, x = 0, y = 0;
FT_Error error;
FT_UInt glyphindex;
FT_Vector kerning;
FTC_Node anode;
//load char
if(!(glyphindex = FT_Get_Char_Index(face, currentchar)))
{
printf("[%s] <FT_Get_Char_Index for Char \"%#.2X\" failed: \"undefined character code\">\n",BASENAME, (int)currentchar);
return 0;
}
if((error = FTC_SBitCache_Lookup(cache, &desc, glyphindex, &sbit, &anode)))
{
printf("[%s] <FTC_SBitCache_Lookup for Char \"%#.2X\" failed with Errorcode 0x%.2X>\n",BASENAME, (int)currentchar, error);
return 0;
}
if(use_kerning)
{
FT_Get_Kerning(face, prev_glyphindex, glyphindex, ft_kerning_default, &kerning);
prev_glyphindex = glyphindex;
kerning.x >>= 6;
}
else
{
kerning.x = 0;
}
// render char
if(color != -1) /* don't render char, return charwidth only */
{
if(sx + sbit->xadvance >= ex)
{
return -1; /* limit to maxwidth */
}
for(row = 0; row < sbit->height; row++)
{
for(pitch = 0; pitch < sbit->pitch; pitch++)
{
for(bit = 7; bit >= 0; bit--)
{
if(pitch*8 + 7-bit >= sbit->width)
{
break; /* render needed bits only */
}
if((sbit->buffer[row * sbit->pitch + pitch]) & 1<<bit)
{
memcpy ( lbb + startx*4 + sx*4 + ( sbit->left + kerning.x + x ) *4 + fix_screeninfo.line_length* ( starty + sy - sbit->top + y ),cpars->bgra[color],4 );
}
x++;
}
}
x = 0;
y++;
}
}
// return charwidth
return sbit->xadvance + kerning.x;
}
/******************************************************************************
* GetStringLen
******************************************************************************/
int Cfb::GetStringLen(const char *string)
{
int stringlen = 0;
// reset kerning
prev_glyphindex = 0;
// calc len
while(*string != '\0')
{
stringlen += RenderChar(*string, -1, -1, -1, -1);
string++;
}
return stringlen;
}
/******************************************************************************
* RenderString
******************************************************************************/
void Cfb::RenderString(const char *string, int sx, int sy, int maxwidth, int layout, int size, int color)
{
int stringlen, ex, charwidth;
// set size
if(size == SMALL)
{
desc.width = desc.height = 26;
}
else if(size == NORMAL)
{
desc.width = desc.height = 32;
}
else
{
desc.width = desc.height = 40;
}
// set alignment
if(layout != LEFT)
{
stringlen = GetStringLen(string);
switch(layout)
{
case CENTER:
if(stringlen < maxwidth)
{
sx += (maxwidth - stringlen)/2;
}
break;
case RIGHT:
if(stringlen < maxwidth)
{
sx += maxwidth - stringlen;
}
}
}
// reset kerning
prev_glyphindex = 0;
// render string
ex = sx + maxwidth;
while(*string != '\0')
{
if((charwidth = RenderChar(*string, sx, sy, ex, color)) == -1)
{
return; /* string > maxwidth */
}
sx += charwidth;
string++;
}
}
/******************************************************************************
* RenderBox
******************************************************************************/
void Cfb::RenderBox(int sx, int sy, int ex, int ey, int mode, int color)
{
int loop;
if(mode == FILL)
{
for(; sy <= ey; sy++)
{
HorLine(sx, sy, ex-sx+1, color);
}
}
else
{
// hor lines
for(loop = sx; loop <= ex; loop++)
{
SetPixel(loop, sy , color);
SetPixel(loop, sy+1, color);
SetPixel(loop, ey-1, color);
SetPixel(loop, ey , color);
}
// ver lines
for(loop = sy; loop <= ey; loop++)
{
SetPixel(sx , loop, color);
SetPixel(sx+1, loop, color);
SetPixel(ex-1, loop, color);
SetPixel(ex , loop, color);
}
}
}
/******************************************************************************
* RenderCircle
******************************************************************************/
void Cfb::RenderCircle(int sx, int sy, int color)
{
int x, y;
for (y=0; y<15; y++)
for (x=0; x<15; x++)
if (circle[x+y*15])
{
if (circle[x+y*15] == 1)
SetPixel(sx + x, sy + y, color);
else
SetPixel(sx + x, sy + y, (int)circle[x+y*15]);
}
}
/******************************************************************************
* HorLine / SetPixel / PaintIcon
******************************************************************************/
//#define SetPixel(x, y, c) memcpy(lbb + ((startx + (x))<<2) + fix_screeninfo.line_length*(starty + (y)), bgra[c], 4)
void Cfb::HorLine(int x, int y, int l, int color)
{
for (l+=x; x<l; x++)
SetPixel(x, y, color);
}
void Cfb::SetPixel(int x, int y, int c)
{
memcpy(lbb + ((startx + (x))<<2) + fix_screeninfo.line_length*(starty + (y)), cpars->bgra[c], 4);
}
void Cfb::PaintIcon(unsigned char *icon, int sx, int sy)
{
struct rawHeader header;
uint16_t width, height;
int x, y;
memcpy(&header, icon, sizeof(struct rawHeader));
width = (header.width_hi << 8) | header.width_lo;
height = (header.height_hi << 8) | header.height_lo;
icon+=sizeof(struct rawHeader);
for (y=0; y<height; y++)
{
for (x=0; x<width; x+=2)
{
unsigned char pix;
pix = (*icon & 0xf0) >> 4;
if (pix != header.transp)
SetPixel(sx+x, sy+y, pix+1);
pix = (*icon++ & 0x0f);
if (pix != header.transp)
SetPixel(sx+x+1, sy+y, pix+1);
}
}
}
void Cfb::FBPaint(void)
{
memcpy(lfb, lbb, fix_screeninfo.line_length*var_screeninfo.yres);
}
void Cfb::FBClear(void)
{
RenderBox(0, 0, ex-sx, ey-sy, FILL, 0);
}
/******************************************************************************
* Cleanup
******************************************************************************/
void Cfb::Cleanup (void)
{
FTC_Manager_Done(manager);
FT_Done_FreeType(library);
free(lbb);
munmap(lfb, fix_screeninfo.smem_len);
close(fb);
}

84
archive-sources/FritzCallMonitor/FritzInfoMonitor/framebuffer.h

@ -1,84 +0,0 @@
#ifndef __framebuffer_h__
#define __framebuffer_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdint.h>
#include <linux/fb.h>
/* freetype stuff */
#define FONT "/share/fonts/pakenham.ttf"
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_CACHE_H
#include FT_CACHE_SMALL_BITMAPS_H
#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
#define FTC_Manager_Lookup_Face FTC_Manager_LookupFace
#define _FTC_SBit_Cache_Lookup(a,b,c,d) FTC_SBitCache_Lookup(a,b,c,d,NULL)
#else
#define _FTC_SBit_Cache_Lookup(a,b,c,d) FTC_SBit_Cache_Lookup(a,b,c,d)
#endif
class Cfb
{
public:
Cfb();
~Cfb();
static Cfb* getInstance();
int init();
int RenderChar(FT_ULong currentchar, int sx, int sy, int ex, int color);
int GetStringLen(const char *string);
void RenderString(const char *string, int sx, int sy, int maxwidth, int layout, int size, int color);
void RenderBox(int sx, int sy, int ex, int ey, int mode, int color);
void RenderCircle(int sx, int sy, int color);
void HorLine(int x, int y, int l, int color);
void SetPixel(int x, int y, int c);
void PaintIcon(unsigned char *icon, int sx, int sy);
void FBPaint(void);
void FBClear(void);
void Cleanup (void);
int GetRCCode();
virtual void getDimensions(int* fb_ex, int* fb_sx, int* fb_ey, int* fb_sy){*fb_ex=ex; *fb_sx=sx; *fb_ey=ey; *fb_sy=sy;};
virtual void getStartDimensions(int* fb_startx, int* fb_starty){*fb_startx=startx; *fb_starty=starty;};
virtual int getYScreeninfo(){return var_screeninfo.yres;};
private:
CParser * cpars;
int fb, startx, starty, sx, ex, sy, ey;
struct fb_fix_screeninfo fix_screeninfo;
struct fb_var_screeninfo var_screeninfo;
unsigned char *lfb, *lbb;
FT_Library library;
FTC_Manager manager;
FTC_SBitCache cache;
FTC_SBit sbit;
FTC_ImageTypeRec desc;
FT_Face face;
FT_UInt prev_glyphindex;
FT_Bool use_kerning;
static FT_Error MyFaceRequester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *aface);
struct rawHeader
{
uint8_t width_lo;
uint8_t width_hi;
uint8_t height_lo;
uint8_t height_hi;
uint8_t transp;
} __attribute__ ((packed));
};
#endif //__framebuffer_h__

124
archive-sources/FritzCallMonitor/FritzInfoMonitor/globals.h

@ -1,124 +0,0 @@
#ifndef __globals_h__
#define __globals_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
//settings
#define KBLCKFILE "/tmp/keyboard.lck"
#define NEUTRINOCONF "/var/tuxbox/config/neutrino.conf"
#define CONFIGFILE "/var/tuxbox/config/FritzCallMonitor.cfg"
#define BASENAME "FIM"
#define VERSION "V4.4"
#define COPYR "2011 (c) FlatTV"
/* rc codes */
#define RC_0 '0'
#define RC_1 '1'
#define RC_2 '2'
#define RC_3 '3'
#define RC_4 '4'
#define RC_5 '5'
#define RC_6 '6'
#define RC_7 '7'
#define RC_8 '8'
#define RC_9 '9'
#define RC_RIGHT 0x0191
#define RC_LEFT 0x0192
#define RC_UP 0x0193
#define RC_DOWN 0x0194
#define RC_PLUS 0x0195
#define RC_MINUS 0x0196
#define RC_OK 0x0D
#define RC_STANDBY 0x1C
#define RC_ESC RC_HOME
#define RC_HOME 0x01B1
#define RC_MUTE 0x01B2
#define RC_HELP 0x01B3
#define RC_DBOX 0x01B4
#define RC_INFO RC_HELP
#define RC_GREEN 0x01A1
#define RC_YELLOW 0x01A2
#define RC_RED 0x01A3
#define RC_BLUE 0x01A4
#define RC_PAUSE RC_HELP
#define RC_ALTGR 0x12
#define RC_BS 0x7F
#define RC_POS1 RC_HOME
#define RC_END 0x13
#define RC_INS 0x10
#define RC_ENTF 0x11
#define RC_STRG 0x00
#define RC_LSHIFT 0x0E
#define RC_RSHIFT 0x0E
#define RC_ALT 0x0F
#define RC_NUM RC_DBOX
#define RC_ROLLEN 0x00
#define RC_F5 RC_DBOX
#define RC_F6 RC_HELP
#define RC_F7 RC_MUTE
#define RC_F8 0x01C8
#define RC_F9 0x01C9
#define RC_F10 0x01CA
#define RC_RET 0x0D
#define RC_RET1 0x01CC
#define RC_CAPSLOCK 0x01CD
#define RC_ON 0x01CE
#define RC_F1 RC_RED
#define RC_F2 RC_GREEN
#define RC_F3 RC_YELLOW
#define RC_F4 RC_BLUE
#define RC_PAGEUP 104
#define RC_PAGEDOWN 109
//framebuffer
enum { FILL, GRID};
enum { LEFT, CENTER, RIGHT};
enum { SMALL, NORMAL, BIG};
//parser
enum { TRANSP ,BLACK ,RED ,GREEN,
BROWN ,BLUE ,MAGENTA ,CYAN,
GREY ,B_GREY ,B_RED ,B_GREEN,
YELLOW ,B_BLUE ,B_MAGENTA ,B_CYAN,
WHITE ,CMH ,CMHT ,CMC,
CMCT ,ORANGE ,SKIN0 ,SKIN1
};
enum MENU
{
MENU,
PHONEBOOK,
CALLER_DETAILS,
DIAL,
RECONNECT,
REFRESHCALL,
ADDADR,
RSEARCH,
ADDRESSBOOK
};
enum MESSAGE
{
ERR_CONNECT,
ERR_LOGIN,
INFO,
INFO_ADDADR,
INFO_DIALTEST,
INFO_DIAL,
INFO_PHONEBOOK,
INFO_RSEARCH,
INFO_RECONNECT,
LOAD
};
#endif //__globals_h__

738
archive-sources/FritzCallMonitor/FritzInfoMonitor/icons.cpp

@ -1,738 +0,0 @@
#include <cstddef>
#include "icons.h"
CIcons* CIcons::getInstance()
{
static CIcons* instance = NULL;
if(!instance)
instance = new CIcons();
return instance;
}
CIcons::CIcons()
{
//
};
CIcons::~CIcons()
{
}
unsigned char * CIcons::getIcon_ni()
{
static unsigned char ni[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x33 ,0x33 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x33 ,0x03 ,0x33 ,0x33 ,
0x03 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x00 ,0x33 ,0x33 ,0x03 ,0x33 ,0x30 ,
0x00 ,0x33 ,0x33 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x33 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x33 ,0x33 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x33 ,0x33 ,0x30 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x33 ,0x33 ,0x33 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x33 ,0x33 ,0x30 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x03 ,0x33 ,0x33 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x33 ,0x33 ,0x30 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x03 ,0x33 ,0x33 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x33 ,0x33 ,0x33 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x03 ,0x33 ,0x33 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x33 ,0x33 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x00 ,0x33 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x33 ,0x30 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x33 ,0x03 ,0x33 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x33 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 };
return(ni);
}
unsigned char * CIcons::getIcon_phone1()
{
/*blue*/
static unsigned char phone1[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0xcc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
0x0c, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x0c, 0xcc, 0x00, 0x00, 0x00,
0x0c, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0xcc, 0xc0, 0x00, 0x00, 0x00,
0x0c, 0xcc, 0xcc, 0xcc, 0x00, 0x0c, 0x0c, 0xcc, 0x00, 0x00, 0x00, 0x00,
0x0c, 0xcc, 0xcc, 0x00, 0x00, 0x0c, 0xcc, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0xc0, 0x00, 0x00, 0x0c, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0xcc, 0x00, 0x00, 0x0c, 0xcc, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0c, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0c, 0xcc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0c, 0xcc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x0c, 0xcc, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xcc, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(phone1);
}
unsigned char * CIcons::getIcon_phone2()
{
/*red*/
static unsigned char phone2[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x99, 0x99, 0x90, 0x00, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x00,
0x09, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x00,
0x09, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x00,
0x09, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x00,
0x09, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x99, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x09, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x09, 0x99, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x09, 0x99, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x99, 0x99, 0x00, 0x09, 0x99, 0x90, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x09, 0x99, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x99, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(phone2);
}
unsigned char * CIcons::getIcon_phone3()
{
/*green*/
static unsigned char phone3[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xaa, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00,
0x0a, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x00, 0x00, 0x00,
0x0a, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00,
0x0a, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x0a, 0xaa, 0x0a, 0x00, 0x00, 0x00,
0x0a, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00,
0x00, 0xaa, 0xa0, 0x00, 0x00, 0x0a, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0a, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0a, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0a, 0xaa, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x0a, 0xaa, 0xa0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(phone3);
}
#if 0
unsigned char * CIcons::getIcon_up()
{
static unsigned char up[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(up);
}
unsigned char * CIcons::getIcon_down()
{
static unsigned char down[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(down);
}
unsigned char * CIcons::getIcon_plus()
{
static unsigned char plus[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(plus);
}
unsigned char * CIcons::getIcon_minus()
{
static unsigned char minus[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(minus);
}
unsigned char * CIcons::getIcon_power_button()
{
static unsigned char power_button[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33, 0x30, 0x00, 0x00,
0x00, 0x00, 0x33, 0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33, 0x33, 0x00, 0x00,
0x00, 0x33, 0x33, 0x33, 0xf3, 0x3f, 0xf3, 0x3f, 0x33, 0x33, 0x33, 0x00,
0x03, 0x33, 0x33, 0x3f, 0xf3, 0x3f, 0xf3, 0x3f, 0xf3, 0x33, 0x33, 0x30,
0x03, 0x33, 0x33, 0xff, 0xf3, 0x3f, 0xf3, 0x3f, 0xff, 0x33, 0x33, 0x30,
0x33, 0x33, 0x3f, 0xff, 0x33, 0x33, 0x33, 0x33, 0xff, 0xf3, 0x33, 0x33,
0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33, 0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33,
0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33, 0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33,
0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33, 0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33,
0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33, 0x33, 0x33, 0x3f, 0xf3, 0x33, 0x33,
0x33, 0x33, 0x3f, 0xff, 0x33, 0x33, 0x33, 0x33, 0xff, 0xf3, 0x33, 0x33,
0x03, 0x33, 0x33, 0xff, 0xf3, 0x33, 0x33, 0x3f, 0xff, 0x33, 0x33, 0x30,
0x03, 0x33, 0x33, 0x3f, 0xff, 0x33, 0x33, 0xff, 0xf3, 0x33, 0x33, 0x30,
0x00, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x00,
0x00, 0x00, 0x33, 0x33, 0x3f, 0xff, 0xff, 0xf3, 0x33, 0x33, 0x00, 0x00,
0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(power_button);
}
#endif
unsigned char * CIcons::getIcon_help()
{
static unsigned char help[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(help);
}
#if 0
unsigned char * CIcons::getIcon_info()
{
static unsigned char info[]={
0x18, 0x00, 0x18, 0x00, 0x0d,
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x8d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd0, 0x08, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x0f, 0xb0, 0x8d, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xd0, 0xfb, 0xfb, 0x08, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0x0f, 0xbf, 0xbf, 0xb0, 0x8d, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xd0, 0xfb, 0xfb, 0xfb, 0xfb, 0x08, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0x0f, 0xbf, 0x44, 0x44, 0xbf, 0xb0, 0x8d, 0xdd, 0xdd,
0xdd, 0xdd, 0xd0, 0xfb, 0xfb, 0x44, 0x44, 0xfb, 0xf7, 0x08, 0xdd, 0xdd,
0xdd, 0xdd, 0x0f, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xb0, 0x8d, 0xdd,
0xdd, 0xd0, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, 0x08, 0xdd,
0xdd, 0x0f, 0xbf, 0xbf, 0xbf, 0x44, 0x44, 0xbf, 0xbf, 0xbf, 0xb0, 0x8d,
0xd0, 0xfb, 0xfb, 0xfb, 0xfb, 0x44, 0x44, 0xfb, 0xfb, 0xfb, 0xfb, 0x08,
0xd8, 0x0f, 0xbf, 0xbf, 0xbf, 0x44, 0x44, 0xbf, 0xbf, 0xbf, 0xb0, 0x8d,
0xdd, 0x80, 0xfb, 0xfb, 0xfb, 0x44, 0x44, 0xfb, 0xfb, 0xfb, 0x08, 0xdd,
0xdd, 0xd8, 0x0f, 0xbf, 0xbf, 0x44, 0x44, 0xbf, 0xbf, 0xb0, 0x8d, 0xdd,
0xdd, 0xdd, 0x80, 0xfb, 0xfb, 0x44, 0x44, 0xfb, 0xfb, 0x08, 0xdd, 0xdd,
0xdd, 0xdd, 0xd8, 0x0f, 0xbf, 0x44, 0x44, 0xbf, 0xb0, 0x8d, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0x80, 0xfb, 0xfb, 0xfb, 0xfb, 0x08, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xd8, 0x0f, 0xbf, 0xbf, 0xb0, 0x8d, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0x80, 0xfb, 0xfb, 0x08, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xd8, 0x0f, 0xb0, 0x8d, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0x80, 0x08, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd8, 0x8d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd };
return(info);
}
unsigned char * CIcons::getIcon_mute_small()
{
static unsigned char mute_small[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0xf8, 0xf8, 0xf8, 0x88, 0xf8, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0x88, 0xf8, 0x8f, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xf8, 0xf8, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xf8, 0xf8, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xf8, 0xf8, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0x88, 0xf8, 0x8f, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0xf8, 0xf8, 0xf8, 0x88, 0xf8, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(mute_small);
}
#endif
unsigned char * CIcons::getIcon_left()
{
static unsigned char left[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(left);
}
unsigned char * CIcons::getIcon_right()
{
static unsigned char right[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(right);
}
#if 0
unsigned char * CIcons::getIcon_lock()
{
static unsigned char lock[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xbb, 0xbb, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0b, 0xbb, 0xbb, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0b, 0xbb, 0xbb, 0xbb, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x00,
0xbb, 0x00, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb0,
0xbb, 0x00, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb0,
0xbb, 0x00, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x00,
0xbb, 0xbb, 0xbb, 0xbb, 0xb0, 0xbb, 0xb0, 0x00, 0xbb, 0xb0, 0xb0, 0x00,
0x0b, 0xbb, 0xbb, 0xbb, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0b, 0xbb, 0xbb, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xbb, 0xbb, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(lock);
}
unsigned char * CIcons::getIcon_dbox()
{
static unsigned char dbox[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0xf8, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0xf8, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0xff, 0xf8, 0xff, 0xf8, 0x88, 0xff, 0x88, 0xf8, 0xf8, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0xf8, 0x8f, 0x8f, 0x88, 0xf8, 0x8f, 0x88, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0xf8, 0x8f, 0x8f, 0x88, 0xf8, 0x8f, 0x88, 0x88,
0x88, 0x88, 0xff, 0xf8, 0xff, 0xf8, 0x88, 0xff, 0x88, 0xf8, 0xf8, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(dbox);
}
unsigned char * CIcons::getIcon_lame()
{
static unsigned char lame[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x00, 0x00,
0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00,
0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x00,
0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10,
0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10,
0x11, 0xf1, 0x11, 0x11, 0xff, 0xf1, 0xf1, 0x11, 0xf1, 0xff, 0xff, 0x11,
0x11, 0xf1, 0x11, 0x1f, 0x11, 0xf1, 0xff, 0x1f, 0xf1, 0xf1, 0x11, 0x11,
0x11, 0xf1, 0x11, 0x1f, 0x11, 0xf1, 0xf1, 0xf1, 0xf1, 0xff, 0xf1, 0x11,
0x11, 0xf1, 0x11, 0x1f, 0xff, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0x11, 0x11,
0x11, 0xf1, 0x11, 0x1f, 0x11, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0x11, 0x11,
0x11, 0xff, 0xff, 0x1f, 0x11, 0xf1, 0xf1, 0xf1, 0xf1, 0xff, 0xff, 0x11,
0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10,
0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10,
0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x00,
0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00,
0x00, 0x00, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(lame);
}
#endif
unsigned char * CIcons::getIcon_ok()
{
static unsigned char ok[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0xff, 0xff, 0xf8, 0x8f, 0xf8, 0x8f, 0xf8, 0x88, 0x80,
0x88, 0x88, 0x8f, 0xf8, 0x88, 0xff, 0x8f, 0xf8, 0xff, 0x88, 0x88, 0x88,
0x88, 0x88, 0x8f, 0xf8, 0x88, 0xff, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x8f, 0xf8, 0x88, 0xff, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x8f, 0xf8, 0x88, 0xff, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88,
0x88, 0x88, 0x8f, 0xf8, 0x88, 0xff, 0x8f, 0xf8, 0xff, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0xff, 0xff, 0xf8, 0x8f, 0xf8, 0x8f, 0xf8, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(ok);
}
#if 0
unsigned char * CIcons::getIcon_home()
{
static unsigned char home[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x8f, 0xff, 0xf8, 0x8f, 0xf8, 0x8f, 0xff, 0xf8, 0x88, 0xf8, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0xf8, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0xf8, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x88, 0x88,
0x88, 0x8f, 0x88, 0xf8, 0x8f, 0xf8, 0x8f, 0x8f, 0x8f, 0x88, 0xff, 0x88,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(home);
}
#endif
unsigned char * CIcons::getIcon_1()
{
static unsigned char nr1[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x0f, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x0f, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(nr1);
}
#if 0
unsigned char * CIcons::getIcon_2()
{
static unsigned char nr2[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(nr2);
}
unsigned char * CIcons::getIcon_3()
{
static unsigned char nr3[]={
0x18, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x08, 0x88, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xff, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x8f, 0xf8, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88,
0x08, 0x88, 0x88, 0x88, 0x8f, 0xff, 0xff, 0x88, 0x88, 0x88, 0x88, 0x80,
0x08, 0x88, 0x88, 0x88, 0x88, 0xff, 0xf8, 0x88, 0x88, 0x88, 0x88, 0x80,
0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00,
0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
return(nr3);
}
#endif

41
archive-sources/FritzCallMonitor/FritzInfoMonitor/icons.h

@ -1,41 +0,0 @@
#ifndef __icons_h__
#define __icons_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
class CIcons
{
public:
CIcons();
~CIcons();
static CIcons* getInstance();
unsigned char * getIcon_ni();
unsigned char * getIcon_phone1();
unsigned char * getIcon_phone2();
unsigned char * getIcon_phone3();
//unsigned char * getIcon_up();
//unsigned char * getIcon_down();
//unsigned char * getIcon_plus();
//unsigned char * getIcon_minus();
//unsigned char * getIcon_power_button();
unsigned char * getIcon_help();
//unsigned char * getIcon_info();
//unsigned char * getIcon_mute_small();
unsigned char * getIcon_left();
unsigned char * getIcon_right();
//unsigned char * getIcon_lock();
//unsigned char * getIcon_dbox();
//unsigned char * getIcon_lame();
unsigned char * getIcon_ok();
//unsigned char * getIcon_home();
unsigned char * getIcon_1();
//unsigned char * getIcon_2();
//unsigned char * getIcon_3();
private:
};
#endif// __icons_h__

379
archive-sources/FritzCallMonitor/FritzInfoMonitor/parser.cpp

@ -1,379 +0,0 @@
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include "globals.h"
#include "parser.h"
CParser* CParser::getInstance()
{
static CParser* instance = NULL;
if(!instance)
instance = new CParser();
return instance;
}
CParser::CParser()
{
FritzPort = 1012;
FritzWebPort = 80;
SearchPort = 80;
debug = 1;
strcpy(FritzAdr , "fritz.box");
strcpy(SearchAdr , "www.goyellow.de");
//strcpy(ddns_domain , "keine Information gefunden");
strcpy(addressbook , "/var/tuxbox/config/FritzCallMonitor.addr");
struct_dialport dialport_t[MAXDAILPORTS] =
{
{"Fon 1", 1 },
{"Fon 2", 2 },
{"Fon 3", 3 },
{"ISDN & DECT", 50 },
{"ISDN 1", 51 },
{"ISDN 2", 52 },
{"DECT 1", 610 },
{"DECT 2", 611 }
};
memcpy(dialport, &dialport_t, sizeof(dialport_t));
ddns_domain ="keine Information gefunden";
nspver = "";
}
CParser::~CParser()
{
//
}
int CParser::ReadConfig(const char *fname)
{
FILE *fd_conf;
char *ptr;
char *line_buffer;
ssize_t read;
size_t len;
char tmp[6];
line_buffer=NULL;
if((fd_conf = fopen(fname, "r")))
{
while ((read = getline(&line_buffer, &len, fd_conf)) != -1)
{
if (line_buffer[0] == '#')
continue;
if ((ptr = strstr(line_buffer, "FRITZBOXIP=")))
sscanf(ptr + 11, "%63s", (char *) &FritzAdr);
else if ((ptr = strstr(line_buffer, "PORT=")))
sscanf(ptr + 5, "%i", &FritzPort);
else if ((ptr = strstr(line_buffer, "DEBUG=")))
sscanf(ptr + 6, "%i", &debug);
else if ((ptr = strstr(line_buffer, "ADDRESSBOOK=")))
sscanf(ptr + 12, "%127s", (char *) &addressbook);
else if ((ptr = strstr(line_buffer, "PASSWD=")))
sscanf(ptr + 7, "%63s", (char *) &FritzPW);
else if ((ptr = strstr(line_buffer, "CITYPREFIX=")))
sscanf(ptr + 11, "%9s", (char *) &cityprefix);
else if ((ptr = strstr(line_buffer, "DIALPREFIX=")))
sscanf(ptr + 11, "%19s", (char *) &dialprefix);
else if ((ptr = strstr(line_buffer, "PORT_1="))) {
sscanf(ptr + 7, "%[^,],%s", (char *) &dialport[0].port_name, (char *) &tmp);
dialport[0].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_2="))) {
sscanf(ptr + 7, "%[^,],%29s", (char *) &dialport[1].port_name, (char *) &tmp);
dialport[1].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_3="))) {
sscanf(ptr + 7, "%[^,],%29s", (char *) &dialport[2].port_name, (char *) &tmp);
dialport[2].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_4="))) {
sscanf(ptr + 7, "%[^,],%29s", (char *) &dialport[3].port_name, (char *) &tmp);
dialport[3].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_5="))) {
sscanf(ptr + 7, "%[^,],%s", (char *) &dialport[4].port_name, (char *) &tmp);
dialport[4].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_6="))) {
sscanf(ptr + 7, "%[^,],%29s", (char *) &dialport[5].port_name, (char *) &tmp);
dialport[5].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_7="))) {
sscanf(ptr + 7, "%[^,],%29s", (char *) &dialport[6].port_name, (char *) &tmp);
dialport[6].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "PORT_8="))) {
sscanf(ptr + 7, "%[^,],%29s", (char *) &dialport[7].port_name, (char *) &tmp);
dialport[7].port = atoi(tmp);
}
else if ((ptr = strstr(line_buffer, "CALLERLIST_STR="))) {
sscanf(ptr + 15, "%127s", (char *) &liststr);
}
else if ((ptr = strstr(line_buffer, "CALLERLIST_FILE="))) {
sscanf(ptr + 16, "%127s", (char *) &listfile);
}
}
fclose(fd_conf);
if(line_buffer)
free(line_buffer);
}
else
{
printf("[%s] - ERROR open %s\n", BASENAME,fname);
return 1;
}
return 0;
}
void CParser::read_neutrino_osd_conf(int *ex,int *sx,int *ey, int *sy, const char *filename)
{
const char spres[][4]={"","crt","lcd"};
char sstr[4][32];
int pres=-1, resolution=-1, loop, *sptr[4]={ex, sx, ey, sy};
char *buffer;
size_t len;
ssize_t read;
FILE* fd;
fd = fopen(filename, "r");
if(fd){
buffer=NULL;
len = 0;
while ((read = getline(&buffer, &len, fd)) != -1){
sscanf(buffer, "screen_preset=%d", &pres);
sscanf(buffer, "osd_resolution=%d", &resolution);
}
if(buffer)
free(buffer);
rewind(fd);
++pres;
sprintf(sstr[0], "screen_EndX_%s_%d=%%d", spres[pres], resolution);
sprintf(sstr[1], "screen_StartX_%s_%d=%%d", spres[pres], resolution);
sprintf(sstr[2], "screen_EndY_%s_%d=%%d", spres[pres], resolution);
sprintf(sstr[3], "screen_StartY_%s_%d=%%d", spres[pres], resolution);
buffer=NULL;
len = 0;
while ((read = getline(&buffer, &len, fd)) != -1){
for(loop=0; loop<4; loop++) {
sscanf(buffer, sstr[loop], sptr[loop]);
}
}
fclose(fd);
if(buffer)
free(buffer);
}
}
unsigned short CParser::Percentconverter (unsigned short percent)
{
return(2.55*percent);
}
int CParser::ReadColors (const char *filename)
{
FILE *fh;
char *ptr;
char *line_buffer;
ssize_t read;
size_t len;
if (!(fh=fopen(filename, "r")))
{
perror("neutrino.conf");
return(1);
}
line_buffer=NULL;
while ((read = getline(&line_buffer, &len, fh)) != -1)
{
if ((ptr = strstr(line_buffer, "menu_Head_alpha=")))
sscanf(ptr+16, "%hu", &cmh[mALPHA]);
else if ((ptr = strstr(line_buffer, "menu_Head_blue=")))
sscanf(ptr+15, "%hu", &cmh[mBLUE]);
else if ((ptr = strstr(line_buffer, "menu_Head_green=")))
sscanf(ptr+16, "%hu", &cmh[mGREEN]);
else if ((ptr = strstr(line_buffer, "menu_Head_red=")))
sscanf(ptr+14, "%hu", &cmh[mRED]);
else if ((ptr = strstr(line_buffer, "menu_Head_Text_alpha=")))
sscanf(ptr+21, "%hu", &cmht[mALPHA]);
else if ((ptr = strstr(line_buffer, "menu_Head_Text_blue=")))
sscanf(ptr+20, "%hu", &cmht[mBLUE]);
else if ((ptr = strstr(line_buffer, "menu_Head_Text_green=")))
sscanf(ptr+21, "%hu", &cmht[mGREEN]);
else if ((ptr = strstr(line_buffer, "menu_Head_Text_red=")))
sscanf(ptr+19, "%hu", &cmht[mRED]);
else if ((ptr = strstr(line_buffer, "menu_Content_alpha=")))
sscanf(ptr+19, "%hu", &cmc[mALPHA]);
else if ((ptr = strstr(line_buffer, "menu_Content_blue=")))
sscanf(ptr+18, "%hu", &cmc[mBLUE]);
else if ((ptr = strstr(line_buffer, "menu_Content_green=")))
sscanf(ptr+19, "%hu", &cmc[mGREEN]);
else if ((ptr = strstr(line_buffer, "menu_Content_red=")))
sscanf(ptr+17, "%hu", &cmc[mRED]);
else if ((ptr = strstr(line_buffer, "menu_Content_Text_alpha=")))
sscanf(ptr+24, "%hu", &cmct[mALPHA]);
else if ((ptr = strstr(line_buffer, "menu_Content_Text_blue=")))
sscanf(ptr+23, "%hu", &cmct[mBLUE]);
else if ((ptr = strstr(line_buffer, "menu_Content_Text_green=")))
sscanf(ptr+24, "%hu", &cmct[mGREEN]);
else if ((ptr = strstr(line_buffer, "menu_Content_Text_red=")))
sscanf(ptr+22, "%hu", &cmct[mRED]);
}
fclose(fh);
if(line_buffer)
free(line_buffer);
unsigned char bgra_t[][5] = {
"\x00\x00\x00\x00","\x00\x00\x00\xFF","\x00\x00\x80\xFF","\x00\x80\x00\xFF",
"\x00\x48\xA0\xFF","\x80\x00\x00\xFF","\x80\x00\x80\xFF","\x80\x80\x00\xFF",
"\xA0\xA0\xA0\xFF","\x50\x50\x50\xFF","\x00\x00\xFF\xFF","\x00\xFF\x00\xFF",
"\x00\xFF\xFF\xFF","\xFF\x00\x00\xFF","\xFF\x00\xFF\xFF","\xFF\xFF\x00\xFF",
"\xFF\xFF\xFF\xFF","\xFF\x80\x00\xF0","\x80\x00\x00\xF0","\xFF\x80\x00\xFF",
"\x40\x20\x00\xFF","\x00\xC0\xFF\xFF","\x0C\x0C\x0C\xF7","\x30\x30\x30\xF7"
};
bgra_t[CMH][mRED] = Percentconverter(cmh[mRED]);
bgra_t[CMH][mGREEN] = Percentconverter(cmh[mGREEN]);
bgra_t[CMH][mBLUE] = Percentconverter(cmh[mBLUE]);
bgra_t[CMH][mALPHA] = (255-Percentconverter(cmh[mALPHA]));
bgra_t[CMHT][mRED] = Percentconverter(cmht[mRED]);
bgra_t[CMHT][mGREEN] = Percentconverter(cmht[mGREEN]);
bgra_t[CMHT][mBLUE] = Percentconverter(cmht[mBLUE]);
bgra_t[CMHT][mALPHA] = (255-Percentconverter(cmht[mALPHA]));
bgra_t[CMC][mRED] = Percentconverter(cmc[mRED]);
bgra_t[CMC][mGREEN] = Percentconverter(cmc[mGREEN]);
bgra_t[CMC][mBLUE] = Percentconverter(cmc[mBLUE]);
bgra_t[CMC][mALPHA] = 255-Percentconverter(cmc[mALPHA]);
bgra_t[CMCT][mRED] = Percentconverter(cmct[mRED]);
bgra_t[CMCT][mGREEN] = Percentconverter(cmct[mGREEN]);
bgra_t[CMCT][mBLUE] = Percentconverter(cmct[mBLUE]);
bgra_t[CMCT][mALPHA] = (255-Percentconverter(cmct[mALPHA]));
const int sz = sizeof(bgra)/sizeof(**bgra);
copy(*bgra_t, (*bgra_t) + sz, *bgra);
return(0);
}
#if 0
/******************************************************************************
* local addressbook functions
******************************************************************************/
#endif
int CParser::search_AddrBook(const char *caller)
{
FILE *fd;
char *line_buffer;
string search_str;
ssize_t ptr;
size_t len;
int i=0;
if(strlen(caller)!=0){
search_str = (string) caller + "|";
} else {
return(0);
}
if(!(fd = fopen(addressbook, "r"))) {
perror(addressbook);
return(0);
}
else
{
line_buffer=NULL;
while ((ptr = getline(&line_buffer, &len, fd)) != -1)
{
i++;
if (strstr(line_buffer, search_str.c_str()))
{
sscanf(line_buffer,"%*[^|]|%255[^|]|%127[^|]|%5[^|]|%127[^|]",
(char *) &address.name,
(char *) &address.street,
(char *) &address.code,
(char *) &address.locality);
if (debug)
printf("[%s] - \"%s\" found [%d]\n", BASENAME, caller, i);
fclose(fd);
if(line_buffer)
free(line_buffer);
return(1);
}
}
if (debug)
printf("[%s] - \"%s\" not found in %s\n", BASENAME, caller, addressbook);
fclose(fd);
if(line_buffer)
free(line_buffer);
}
return(0);
}
int CParser::add_AddrBook(const char *caller)
{
ofstream os(addressbook, ios::out | ios::app);
if (os.is_open())
{
os << caller << '|'
<< address.name << '|'
<< address.street << '|'
<< address.code << '|'
<< address.locality << '|' << endl;
os.close();
}
else
{
return(0);
}
return(1);
}
void CParser::init_caller()
{
memset(&caller, 0, sizeof(caller));
}
void CParser::init_address()
{
memset(&address, 0, sizeof(address));
}
string CParser::parseString(const char* var, string& string_to_serarch)
{
string res="";
size_t pos1, pos2;
if((pos1 = string_to_serarch.find(var)) != string::npos)
{
// "ver":"84.05.50"
pos1 += strlen(var)+3;
string tmp = string_to_serarch.substr(pos1);
if((pos2 = tmp.find('"')) != string::npos)
{
res = tmp.substr(0,pos2);
//cout << " result: " << var << " = " << res << endl;
}
}
else
cout << '[' << BASENAME << "] - " << __FUNCTION__ << "(): no result for " << '"' << var << '"' << endl;
return(res);
}

122
archive-sources/FritzCallMonitor/FritzInfoMonitor/parser.h

@ -1,122 +0,0 @@
#ifndef __parser_h__
#define __parser_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <string>
#include <vector>
using namespace std;
class CParser
{
public:
CParser();
virtual~CParser();
static CParser* getInstance();
int ReadConfig(const char *fname);
unsigned short Percentconverter (unsigned short percent);
void read_neutrino_osd_conf(int *ex,int *sx,int *ey, int *sy, const char *filename);
int ReadColors (const char *filename);
int search_AddrBook(const char *caller);
int add_AddrBook(const char *caller);
void init_caller();
void init_address();
string parseString(const char* var, std::string& string_to_serarch);
unsigned char bgra[24][5];
typedef struct {
char number[64];
char name[256];
char street[128];
char code[6];
char locality[128];
} S_ADDRESS;
S_ADDRESS address;
#define MAXCALLER 12
typedef struct {
char call_type[2];
char call_date[20];
char call_name[256];
char call_numr[64];
char call_time[6];
char port_rout[20];
char port_name[30];
} S_CALLER;
S_CALLER caller[MAXCALLER];
#define MAXDAILPORTS 8
typedef struct s_dialport {
char port_name[30];
int port;
} struct_dialport;
struct_dialport dialport[MAXDAILPORTS];
virtual void setTam0_active(const std::string& Tam0_active){tam0_active = Tam0_active;};
virtual void setTam0_NumNewMessages(const std::string& Tam0_NumNewMessages){tam0_NumNewMessages = Tam0_NumNewMessages;};
virtual void setDdns_state(const std::string& Ddns_state){ddns_state = Ddns_state;};
virtual void setDdns_domain(const std::string& Ddns_domain){ddns_domain = Ddns_domain;};
virtual void setNspver(const std::string& Nspver){nspver = Nspver;};
virtual void setSip0Nr(const std::string& Sip0Nr){sip0nr = Sip0Nr;};
virtual void setSip1Nr(const std::string& Sip1Nr){sip1nr = Sip1Nr;};
virtual void setPppoe_ip(const std::string& Pppoe_ip){pppoe_ip = Pppoe_ip;};
virtual string getTam0_active(){return tam0_active;};
virtual string getTam0_NumNewMessages(){return tam0_NumNewMessages;};
virtual string getDdns_state(){return ddns_state;};
virtual string getDdns_domain(){return ddns_domain;};
virtual string getNspver(){return nspver;};
virtual string getSip0Nr(){return sip0nr;};
virtual string getSip1Nr(){return sip1nr;};
virtual string getPppoe_ip(){return pppoe_ip;};
virtual int getDebug(){return debug;};
virtual int getFritzPort(){return FritzWebPort;};
virtual int getSearchPort(){return SearchPort;};
virtual const char* getFritzAdr(){return FritzAdr;};
virtual const char* getFritzPW(){return FritzPW;};
virtual const char* getSearchAdr(){return SearchAdr;};
virtual const char* getCityprefix(){return cityprefix;};
virtual const char* getDialprefix(){return dialprefix;};
virtual const char* getListfile(){return listfile;};
virtual const char* getListstr(){return liststr;};
virtual const char* getAddressbook(){return addressbook;};
//virtual void setNspver(const char* nspver);
//virtual const char* getNspver(){return nspver;};
protected:
string tam0_active;
string tam0_NumNewMessages;
string ddns_state;
string ddns_domain;
string nspver;
string sip0nr;
string sip1nr;
string pppoe_ip;
int debug;
int FritzPort, FritzWebPort,SearchPort;
char FritzAdr[64];
char FritzPW[64];
char SearchAdr[20];
char cityprefix[10];
char dialprefix[20];
char listfile[128];
char liststr[128];
char addressbook[128];
enum {mBLUE, mGREEN, mRED, mALPHA};
unsigned short cmh[4]; // Titelzeile - menu_Head(SKIN0)
unsigned short cmht[4]; // Titeltextfarbe - menu_Head_Text(ORANGE)
unsigned short cmc[4]; // Hintergrundfarbe - menu_Content(SKIN1)
unsigned short cmct[4]; // Body Textfarbe - menu_Content_Text(WHITE)
};
#endif //__parser_h__

367
archive-sources/FritzCallMonitor/FritzInfoMonitor/phonebook.cpp

@ -1,367 +0,0 @@
#include <fstream>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <iterator>
#include "parser.h"
#include "connect.h"
#include "framebuffer.h"
#include "rc.h"
#include "submenu.h"
#include "globals.h"
#include "phonebook.h"
const char *liste[] = {"AZ","AB","CD","EF","GH","IJK","LM","NO","PQR","STU","VWXYZ"};
// create outstream operator
ostream& operator<< (ostream& out, const CPhoneBook::S_ADDRESS& d)
{
return out << d.number << ',' << d.name << ',' << d.street << ','
<< d.code << ',' << d.locality << ',';
}
void CPhoneBook::toUpper(string& s)
{
for(string::iterator p = s.begin(); p != s.end();++p)
*p = toupper(*p) ;
}
bool CPhoneBook::sortByKey(const S_ADDRESS& a, const S_ADDRESS& b)
{
string na = a.name;
string nb = b.name;
toUpper(na) ;
toUpper(nb) ;
return na < nb;
}
CPhoneBook* CPhoneBook::getInstance()
{
static CPhoneBook* instance = NULL;
if(!instance)
instance = new CPhoneBook();
return instance;
}
CPhoneBook::CPhoneBook()
{
cconnect = CConnect::getInstance();
cpars = CParser::getInstance();
cfb = Cfb::getInstance();
crc = Crc::getInstance();
selList = 0;
selData = -1;
lastData= 0;
perpage = 0;
}
CPhoneBook::~CPhoneBook()
{
}
void CPhoneBook::run()
{
// Get data
getData(CParser::getInstance()->getAddressbook(), liste[selList]);
menu();
unsigned short rccode;
do
{
switch((rccode = crc->getrc()))
{
case RC_RIGHT:
selList++;
if(selList > ((int)(sizeof(liste)/sizeof(liste[0])))-1) {
selList = 0;
}
selData=-1;
getData(CParser::getInstance()->getAddressbook(), liste[selList]);
menu();
break;
case RC_LEFT:
selList--;
if(selList < 0) {
selList = ((int)(sizeof(liste)/sizeof(liste[0])))-1;
}
selData=-1;
getData(CParser::getInstance()->getAddressbook(), liste[selList]);
menu();
break;
case RC_DOWN:
selData++;
if(selData >= (int)content.size()) {
selData = 0;
}
menu();
break;
case RC_UP:
selData--;
if(selData < -1) {
selData = (int)content.size()-1;
}
menu();
break;
case RC_OK:
if(selData != -1) {
dialMenu();
rccode=RC_HOME;
}
break;
case RC_PAGEDOWN:
selData += (selData == -1 ? perpage+1 : perpage);
selData = (selData / perpage) * perpage; // select first item on the site
if(selData >= (int)content.size()) {
selData = -1;
}
menu();
break;
case RC_PAGEUP:
selData -= perpage;
selData = (selData / perpage) * perpage; // select first item on the site
if(selData < -1) {
selData = (int)content.size()-1;
}
menu();
break;
}
}
while(rccode != RC_HOME);
}
void CPhoneBook::menu()
{
int ex, sx, ey, sy;
cfb->getDimensions(&ex, &sx, &ey, &sy);
int vyres = cfb->getYScreeninfo();
int bspace = 40;
int lrspace = 30;
int xwidth = ex-sx-bspace;
int yheight = ey-sy-bspace;
int ld = vyres < 600 ? 25 : 28; //line distance
int slim = ex-sx < 1100 ? 1:0;
int vsx = bspace + lrspace;
int vsy = 80;
ostringstream txt;
int sp1 = vsx;
int le1 = slim?180:250; //name
int sp2 = sp1+le1+18;
int le2 = 180; //number
int sp3 = sp2+le2+18;
int le3 = slim?130:250; //street
int sp4 = sp3+le3+18;
int le4 = 70; //code
int sp5 = sp4+le4+18;
int le5 = 180; //locality
int hvsp = 0;
int hle = 30;
int hitm = (int)(sizeof(liste)/sizeof(liste[0]));
int hsp = (xwidth-(2*lrspace)-(2*hle)) / (hitm-1);
// Grafic
cfb->RenderBox(bspace, 0, xwidth, yheight, FILL, CMC);
cfb->RenderBox(bspace, 0, xwidth, 40, FILL, CMH);
//cfb->PaintIcon(icon_ng,((xwidth+bspace)/2)-(120/2)-35,8);
cfb->RenderString("Adressbuch", ((xwidth+bspace)/2)-(130/2) ,30, 130, CENTER, BIG, CMHT);
// Body headline
for (int i=0; i < hitm; i++)
{
txt.str("");
if(selList == i)
cfb->RenderBox(vsx-3+hvsp, vsy-20, vsx-3+hvsp+hle, vsy+3, selData == -1?FILL:GRID, CMHT);
txt << liste[i][0] << '-' << liste[i][strlen(liste[i])-1];
cfb->RenderString(txt.str().c_str(), vsx+hvsp ,vsy, hle, LEFT, SMALL, (selList == i && selData == -1)?CMC:GREY);
hvsp += hsp;
}
// Body data
vsy += ld+10;
int start = 0;
if(perpage) {
start = (selData / perpage) * perpage;
}
for (int i = start; i < (int)content.size() ; i++)
{
if(i == selData)
cfb->RenderBox(bspace, vsy-ld+3, xwidth, vsy+3, FILL, CMHT);
cfb->RenderString(cconnect->UTF8toISO((char *)content[i].name.c_str()),
sp1, vsy, le1, LEFT, NORMAL, selData==i?CMC:CMCT);
cfb->RenderString(content[i].number.c_str(),
sp2, vsy, le2, LEFT, NORMAL, selData==i?CMC:CMCT);
cfb->RenderString(cconnect->UTF8toISO((char *)content[i].street.c_str()),
sp3, vsy, le3, LEFT, NORMAL, selData==i?CMC:CMCT);
if(xwidth > (sp4+le4))
cfb->RenderString(content[i].code.c_str(),
sp4, vsy, le4, LEFT, NORMAL, selData==i?CMC:CMCT);
if(xwidth > (sp5+le5))
cfb->RenderString(cconnect->UTF8toISO((char *)content[i].locality.c_str()),
sp5, vsy, le5, LEFT, NORMAL, selData==i?CMC:CMCT);
vsy += ld;
if(vsy >= yheight-ld)
{
//cfb->RenderString("----", sp1, vsy, le1, LEFT, NORMAL, CMHT);
if(perpage == 0) {
perpage = i+1;
cout << "perpage = " << perpage << endl;
}
break;
}
lastData = i;
}
// Footer
txt.str("");
txt << "Seite " << getSites(lastData+1) << " von " << getSites(content.size());
cfb->RenderBox(bspace, yheight, xwidth, yheight+30, FILL, CMH);
cfb->RenderString(txt.str().c_str(), ((xwidth+bspace)/2)-(130/2) ,yheight+20, 130, CENTER, SMALL, GREY);
cfb->FBPaint();
}
void CPhoneBook::dialMenu()
{
int dialtest = 0;
ostringstream txt;
CSubMenu::getInstance()->DialMenu(dialtest);
unsigned short rccode;
do
{
switch((rccode = crc->getrc()))
{
case RC_UP:
CSubMenu::getInstance()->subMenu[DIAL].sel--;
CSubMenu::getInstance()->DialMenu(dialtest);
break;
case RC_DOWN:
CSubMenu::getInstance()->subMenu[DIAL].sel++;
CSubMenu::getInstance()->DialMenu(dialtest);
break;
case RC_OK:
cconnect->get_login(cpars->getFritzPW());
cfb->FBClear();
txt.str("");
txt << cpars->getDialprefix() << content[selData].number;
CSubMenu::getInstance()->ShowMessage(INFO_DIAL,1);
cconnect->dial(cconnect->getSid(),cpars->dialport[CSubMenu::getInstance()->subMenu[DIAL].sel].port, txt.str().c_str());
cout << '[' << BASENAME << "] - " << __FILE__ << " dialport: " << cpars->dialport[CSubMenu::getInstance()->subMenu[DIAL].sel].port
<< " number : " << content[selData].number << endl;
if(cconnect->getQueryLogic()==1)
cconnect->send_logout(cconnect->getSid());
break;
}
}
while(rccode!=RC_HOME);
run();
}
int CPhoneBook::getData(const char *fname, const char *list)
{
memset(&content, 0, sizeof(content));
ifstream fh(fname);
if ( fh.is_open() )
{
string line;
while (getline(fh,line))
{
S_ADDRESS entry;
istringstream in(line);
if(getline(in, entry.number, '|') && //in >> entry.number && in.get() == '|' &&
getline(in, entry.name, '|') &&
getline(in, entry.street, '|') &&
getline(in, entry.code, '|') &&
getline(in, entry.locality, '|') )
{
if(strcmp(list,"AZ" /*all*/) == 0)
{
content.push_back(entry);
}
else
{
for(int i=0; i<(int)strlen(list); i++)
{
//printf("search for '%c' > %s (%d)\n",list[i],entry.name.c_str(),(int)strlen(list));
if(toupper(entry.name[0]) == list[i]) {
content.push_back(entry);
break;
}
}
}
}
else {
cerr << '[' << BASENAME << "] - " << __FILE__ << " could not parse input line: " << line << endl;
}
}
cout << '[' << BASENAME << "] - " << __FILE__ << ' ' << __FUNCTION__ << " elements: " << content.size() << endl;
sort(content.begin(),content.end(), sortByKey);
//copy(content.begin(), content.end(), ostream_iterator<S_ADDRESS>(cout, "\n"));
fh.close();
}
else {
cerr << '[' << BASENAME << "] - " << __FILE__ << "could not open file." << endl;
}
return 0;
}
int CPhoneBook::getSites(int items)
{
int sites = 0;
if(perpage) {
sites = items / perpage;
if(items % perpage)
sites++;
}
if(!sites)
sites = 1;
return(sites);
}

50
archive-sources/FritzCallMonitor/FritzInfoMonitor/phonebook.h

@ -1,50 +0,0 @@
#ifndef __phonebook_h__
#define __phonebook_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <vector>
using namespace std;
class CPhoneBook
{
public:
CPhoneBook();
~CPhoneBook();
static CPhoneBook* getInstance();
void run();
private:
CConnect * cconnect;
CParser * cpars;
Cfb * cfb;
Crc * crc;
struct S_ADDRESS {
string number;
string name;
string street;
string code;
string locality;
};
vector<S_ADDRESS> content;
static bool sortByKey(const S_ADDRESS& a, const S_ADDRESS& b);
static void toUpper(string& s);
void menu();
void dialMenu();
int getData(const char *fname, const char *list);
int getSites(int items);
int selList, selData, lastData;
int perpage;
friend ostream& operator<< (ostream& out, const S_ADDRESS& d);
};
#endif //__phonebook_h__

113
archive-sources/FritzCallMonitor/FritzInfoMonitor/rc.cpp

@ -1,113 +0,0 @@
#include <fcntl.h>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include "globals.h"
#include "rc.h"
Crc* Crc::getInstance()
{
static Crc* instance = NULL;
if(!instance)
instance = new Crc();
return instance;
}
Crc::Crc()
{
rc = -1;
/* open Remote Control */
rc = open ( "/dev/input/nevis_ir", O_RDONLY );
if ( rc == -1 )
{
perror ( "<open remote control>" );
exit ( 1 );
}
// lock keyboard-conversions, this is done by the plugin itself
fclose(fopen(KBLCKFILE,"w"));
}
Crc::~Crc()
{
Cleanup();
}
void Crc::Cleanup (void)
{
// enable keyboard-conversion again
unlink(KBLCKFILE);
close(rc);
}
long Crc::getrc()
{
//get rc socket
fd_set fds;
FD_ZERO(&fds);
FD_SET(rc, &fds);
select(rc+1, &fds, 0, 0, 0);
if (FD_ISSET(rc, &fds))
return(GetRCCode());
else
return(-1);
}
int Crc::GetRCCode()
{
long rcc=(-1);
static __u16 rc_last_key = KEY_RESERVED;
if (read(rc, &ev, sizeof(ev))==sizeof(ev))
{
if (ev.value)
{
if (ev.code!=rc_last_key)
{
rc_last_key=ev.code;
switch(ev.code)
{
case KEY_UP: rcc=RC_UP; break;
case KEY_DOWN: rcc=RC_DOWN; break;
case KEY_LEFT: rcc=RC_LEFT; break;
case KEY_RIGHT: rcc=RC_RIGHT; break;
case KEY_OK: rcc=RC_OK; break;
case KEY_0: rcc=RC_0; break;
case KEY_1: rcc=RC_1; break;
case KEY_2: rcc=RC_2; break;
case KEY_3: rcc=RC_3; break;
case KEY_4: rcc=RC_4; break;
case KEY_5: rcc=RC_5; break;
case KEY_6: rcc=RC_6; break;
case KEY_7: rcc=RC_7; break;
case KEY_8: rcc=RC_8; break;
case KEY_9: rcc=RC_9; break;
case KEY_RED: rcc=RC_RED; break;
case KEY_GREEN: rcc=RC_GREEN; break;
case KEY_YELLOW: rcc=RC_YELLOW; break;
case KEY_BLUE: rcc=RC_BLUE; break;
case KEY_VOLUMEUP: rcc=RC_PLUS; break;
case KEY_VOLUMEDOWN: rcc=RC_MINUS; break;
case KEY_MUTE: rcc=RC_MUTE; break;
case KEY_HELP: rcc=RC_HELP; break;
case KEY_INFO: rcc=RC_HELP; break;
case KEY_SETUP: rcc=RC_DBOX; break;
case KEY_EXIT: rcc=RC_HOME; break;
case KEY_HOME: rcc=RC_HOME; break;
case KEY_PAGEUP: rcc=RC_PAGEUP; break;
case KEY_PAGEDOWN: rcc=RC_PAGEDOWN;break;
case KEY_POWER: rcc=RC_STANDBY;
}
}
}
else
rc_last_key=KEY_RESERVED;
}
return(rcc);
}

27
archive-sources/FritzCallMonitor/FritzInfoMonitor/rc.h

@ -1,27 +0,0 @@
#ifndef __rc_h__
#define __rc_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
//rc stuff
#include <linux/input.h>
class Crc
{
public:
Crc();
~Crc();
static Crc* getInstance();
long int getrc();
void Cleanup (void);
private:
int rc;
struct input_event ev;
int GetRCCode();
};
#endif

54
archive-sources/FritzCallMonitor/FritzInfoMonitor/starter.c

@ -1,54 +0,0 @@
/*
* $Id$
*
* shellexec - d-box2 linux project
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU 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 General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <plugin.h>
#define SCRIPT "FritzInfoMonitor"
int main()
{
int ret, pid, status;
pid=vfork();
if (pid == -1) {
fprintf(stderr, "[%s.so] vfork\n", SCRIPT);
return;
} else
if (pid == 0) {
fprintf(stderr, "[%s.so] forked, executing %s\n", SCRIPT, SCRIPT);
for (ret=3 ; ret < 255; ret++)
close (ret);
ret = execlp(SCRIPT, SCRIPT, NULL);
if (ret)
fprintf(stderr, "[%s.so] script return code: %d (%m)\n", SCRIPT, ret);
else
fprintf(stderr, "[%s.so] script return code: %d\n", SCRIPT, ret);
_exit(ret);
}
fprintf(stderr, "[%s.so] parent, waiting for child with pid %d...\n", SCRIPT, pid);
waitpid(pid, &status, 0);
fprintf(stderr, "[%s.so] parent, waitpid() returned..\n", SCRIPT);
if (WIFEXITED(status))
fprintf(stderr, "[%s.so] child returned with status %d\n", SCRIPT, WEXITSTATUS(status));
return (status);
}

353
archive-sources/FritzCallMonitor/FritzInfoMonitor/submenu.cpp

@ -1,353 +0,0 @@
#include <fstream>
#include <iostream>
#include <sstream>
#include "parser.h"
#include "connect.h"
#include "framebuffer.h"
#include "icons.h"
#include "globals.h"
#include "submenu.h"
CSubMenu* CSubMenu::getInstance()
{
static CSubMenu* instance = NULL;
if(!instance)
instance = new CSubMenu();
return instance;
}
CSubMenu::CSubMenu()
{
cpars = CParser::getInstance();
cfb = Cfb::getInstance();
cicons = CIcons::getInstance();
int ex, sx, ey, sy;
cfb->getDimensions(&ex, &sx, &ey, &sy);
int vyres = cfb->getYScreeninfo();
bspace = 40;
lrspace = 30;
xwidth = ex-sx-bspace;
yheight = ey-sy-bspace;
xcenter = (xwidth/2)+(bspace/2);
ycenter = (yheight/2)+(bspace/2);
ld = vyres < 600 ? 35 : 35; //line distance
so = 5; //shadow offset
S_SUBMENU entry;
/*MENU*/
entry.sel = 0;
entry.mwidth = 400;
entry.mitems = 5;
subMenu.push_back(entry);
/*PHONEBOOK*/
entry.sel = 0;
entry.mwidth = 320;
entry.mitems = 4;
subMenu.push_back(entry);
/*CALLER_DETAILS*/
entry.sel = 0;
entry.mwidth = 400;
entry.mitems = 4;
subMenu.push_back(entry);
/*DIAL*/
entry.sel = 0;
entry.mwidth = 420;
entry.mitems = (int)(sizeof(CParser::getInstance()->dialport)/sizeof(CParser::getInstance()->dialport[0]));
subMenu.push_back(entry);
};
CSubMenu::~CSubMenu()
{
}
/******************************************************************************
* ShowMenu (submenu)
******************************************************************************/
void CSubMenu::ShowSubMenu(int menu)
{
printf("[%s] - %s %s(%d)\n",BASENAME, __FILE__, __FUNCTION__, menu);
int mitems = subMenu[menu].mitems;
int mwidth = subMenu[menu].mwidth;
int selected = subMenu[menu].sel;
int vsx = ycenter - ((mitems/2)*ld);
int mhw = mwidth/2;
int i = 0;
int mlrspace = 0;
std::ostringstream msg;
// Grafic
cfb->RenderBox(xcenter+mhw, vsx-ld+so, xcenter+mhw+so, vsx+(ld*mitems)+(ld/2), FILL, BLACK);
cfb->RenderBox(xcenter-mhw+so, vsx+(ld*mitems), xcenter+mhw+so, vsx+(ld*mitems)+(ld/2)+so, FILL, BLACK);
cfb->RenderBox(xcenter-mhw, vsx-ld, xcenter+mhw, vsx+(ld*mitems), FILL, CMH);
cfb->RenderBox(xcenter-mhw, vsx, xcenter+mhw, vsx+(ld*mitems)+(ld/2), FILL, CMC);
switch(menu)
{
case MENU:
cfb->RenderString("FRITZ! Info-Menü", xcenter-mhw, vsx-(ld/3), (xcenter+mhw)-(xcenter-mhw), CENTER, NORMAL, CMHT);
// selected
if(selected < 0)
selected = mitems -1;
else if (selected > (mitems -1))
selected = 0;
subMenu[menu].sel = selected;
cfb->RenderBox(xcenter-mhw, vsx+(ld/3)+(selected*ld), xcenter+mhw, vsx+(ld/4)+((selected+1)*ld), FILL, CMHT);
i = 0;
mlrspace = lrspace + 10;
cfb->RenderCircle( xcenter-mhw+(mlrspace/3), vsx+((i+1)*ld)-15, RED);
cfb->RenderString("Telefonbuch der FRITZ!Box übernehmen", xcenter-mhw+mlrspace, vsx+((i+1)*ld), (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, selected==i?CMC:CMCT);
i++;
cfb->RenderCircle( xcenter-mhw+(mlrspace/3), vsx+((i+1)*ld)-15, GREEN);
cfb->RenderString("Wählhilfe", xcenter-mhw+mlrspace, vsx+((i+1)*ld), (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, selected==i?CMC:CMCT);
i++;
cfb->RenderCircle( xcenter-mhw+(mlrspace/3), vsx+((i+1)*ld)-15, YELLOW);
cfb->RenderString("Internet trennen und neu verbinden", xcenter-mhw+mlrspace, vsx+((i+1)*ld), (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, selected==i?CMC:CMCT);
i++;
cfb->RenderCircle( xcenter-mhw+(mlrspace/3), vsx+((i+1)*ld)-15, BLUE);
cfb->RenderString("Anrufliste aktualisieren", xcenter-mhw+mlrspace, vsx+((i+1)*ld), (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, selected==i?CMC:CMCT);
i++;
cfb->PaintIcon(cicons->getIcon_1(), xcenter-mhw+(mlrspace/3)-5, vsx+((i+1)*ld)-15-5);
cfb->RenderString("Adressbuch öffnen", xcenter-mhw+mlrspace, vsx+((i+1)*ld), (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, selected==i?CMC:CMCT);
break;
case PHONEBOOK:
cfb->RenderString("Telefonbuch Menü", xcenter-mhw, vsx-(ld/3), (xcenter+mhw)-(xcenter-mhw), CENTER, NORMAL, CMHT);
// selected
if(selected < 0)
selected = mitems -1;
else if (selected > (mitems -1))
selected = 0;
subMenu[menu].sel = selected;
cfb->RenderBox(xcenter-mhw, vsx+(ld/3)+(selected*ld), xcenter+mhw, vsx+(ld/4)+((selected+1)*ld), FILL, CMHT);
for(i=0; i<mitems; i++)
{
int icon=0;
switch(i)
{
case 0: icon = RED; break;
case 1: icon = GREEN; break;
case 2: icon = YELLOW; break;
case 3: icon = BLUE; break;
}
cfb->RenderCircle( xcenter-mhw+(lrspace/3), vsx+((i+1)*ld)-15, icon);
msg.str("");
msg << "Telefonbuch Nr." << i+1 << " übernehmen";
cfb->RenderString(msg.str().c_str(), xcenter-mhw+lrspace, vsx+((i+1)*ld), (xcenter+mhw)-(xcenter-mhw-lrspace), LEFT, NORMAL, selected==i?CMC:CMCT);
}
break;
}
cfb->FBPaint();
}
void CSubMenu::DialMenu(int dialtest)
{
printf("[%s] - %s %s(%d)\n",BASENAME, __FILE__, __FUNCTION__, dialtest);
int mitems = subMenu[DIAL].mitems;
int mwidth = subMenu[DIAL].mwidth;
int selected = subMenu[DIAL].sel;
int vsx = ycenter - ((mitems/2)*ld);
int mhw = mwidth/2;
std::ostringstream msg;
// Grafic
cfb->RenderBox(xcenter+mhw, vsx-ld+so, xcenter+mhw+so, vsx+(ld*mitems)+(ld/2), FILL, BLACK);
cfb->RenderBox(xcenter-mhw+so, vsx+(ld*mitems), xcenter+mhw+so, vsx+(ld*mitems)+(ld/2)+so, FILL, BLACK);
cfb->RenderBox(xcenter-mhw, vsx-ld, xcenter+mhw, vsx+(ld*mitems), FILL, CMH);
cfb->RenderBox(xcenter-mhw, vsx, xcenter+mhw, vsx+(ld*mitems)+(ld/2), FILL, CMC);
cfb->RenderString("Wählhilfe Menü", xcenter-mhw, vsx-(ld/3), (xcenter+mhw)-(xcenter-mhw), CENTER, NORMAL, CMHT);
// selected
if(selected < 0)
selected = mitems -1;
else if (selected > (mitems -1))
selected = 0;
subMenu[DIAL].sel = selected;
cfb->RenderBox(xcenter-mhw, vsx+(ld/3)+(selected*ld), xcenter+mhw, vsx+(ld/4)+((selected+1)*ld), FILL, CMHT);
for(int i=0; i<mitems; i++)
{
cfb->RenderString(CParser::getInstance()->dialport[i].port_name, xcenter-mhw+lrspace, vsx+(i*ld)+ld, (xcenter+mhw)-(xcenter-mhw-30), LEFT, NORMAL, selected==i?CMC:CMCT);
msg.str("");
msg << "(Intern **" << CParser::getInstance()->dialport[i].port << ')';
cfb->RenderString(msg.str().c_str(), xcenter-mhw+260, vsx+(i*ld)+ld, (xcenter+mhw)-(xcenter-mhw-lrspace), LEFT, NORMAL, selected==i?CMC:CMCT);
}
//footer
if(dialtest)
{
cfb->RenderBox(xcenter-mhw+so, vsx+(ld*mitems)+(ld/2), xcenter+mhw+so, vsx+(ld*mitems)+(ld/2)+23+so, FILL, BLACK); //shadow
cfb->RenderBox(xcenter-mhw, vsx+(ld*mitems)+(ld/2), xcenter+mhw, vsx+(ld*mitems)+(ld/2)+23, FILL, CMH);
cfb->PaintIcon(cicons->getIcon_ok(), xcenter-mhw+30, vsx+(ld*mitems)+(ld/2));
cfb->RenderString("Testen", xcenter-mhw+60, vsx+(ld*mitems)+(ld/2)+20, (xcenter+mhw)-(xcenter-mhw-30), LEFT, SMALL, GREY);
}
cfb->FBPaint();
}
void CSubMenu::CallerMenu(int rs_result, int callsel)
{
printf("[%s] - %s %s(%d,%d)\n",BASENAME, __FILE__, __FUNCTION__, rs_result, callsel);
int mitems = subMenu[CALLER_DETAILS].mitems;
int mwidth = subMenu[CALLER_DETAILS].mwidth;
//int selected = subMenu[CALLER_DETAILS].sel;
int vsx = ycenter - ((mitems/2)*ld);
int mhw = mwidth/2;
std::ostringstream msg;
// Grafic
cfb->RenderBox(xcenter+mhw, vsx-ld+so, xcenter+mhw+so, vsx+(ld*mitems)+(ld/2), FILL, BLACK);
cfb->RenderBox(xcenter-mhw+so, vsx+(ld*mitems), xcenter+mhw+so, vsx+(ld*mitems)+(ld/2)+so, FILL, BLACK);
cfb->RenderBox(xcenter-mhw, vsx-ld, xcenter+mhw, vsx+(ld*mitems), FILL, CMH);
cfb->RenderBox(xcenter-mhw, vsx, xcenter+mhw, vsx+(ld*mitems)+(ld/2), FILL, CMC);
cfb->RenderString(rs_result?"GoYellow":"Details", xcenter-mhw, vsx-(ld/3), (xcenter+mhw)-(xcenter-mhw), CENTER, NORMAL, CMHT);
int i=0;
cfb->RenderString(cpars->caller[callsel].call_numr, xcenter-mhw+lrspace, vsx+(i*ld)+ld, (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, CMCT);
i++;
cfb->RenderString((cpars->address.name[0]=='\0'?"Name unbekannt":cconnect->UTF8toISO(cpars->address.name)), xcenter-mhw+lrspace, vsx+(i*ld)+ld, (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, CMCT);
i++;
cfb->RenderString((cpars->address.street[0]=='\0'?"Straße unbekannt":cconnect->UTF8toISO(cpars->address.street)), xcenter-mhw+lrspace, vsx+(i*ld)+ld, (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, cpars->address.street[0]=='\0'?GREY:CMCT);
i++;
msg.str("");
msg << (cpars->address.code[0]=='\0' ? "Ort unbekannt" : cpars->address.code) << ' ' << cconnect->UTF8toISO(cpars->address.locality);
cfb->RenderString(msg.str().c_str(), xcenter-mhw+lrspace, vsx+(i*ld)+ld, (xcenter+mhw)-(xcenter-mhw), LEFT, NORMAL, cpars->address.code[0]=='\0'?GREY:CMCT);
//footer
if(strlen(cpars->caller[callsel].call_numr)!=0)
{
cfb->RenderBox(xcenter-mhw+so, vsx+(ld*mitems)+(ld/2), xcenter+mhw+so, vsx+(ld*mitems)+(ld/2)+23+so, FILL, BLACK); //shadow
cfb->RenderBox(xcenter-mhw, vsx+(ld*mitems)+(ld/2), xcenter+mhw, vsx+(ld*mitems)+(ld/2)+23, FILL, CMH);
cfb->RenderCircle( xcenter-mhw+(lrspace/3), vsx+(ld*mitems)+(ld/2)+5, RED);
cfb->RenderString("Anrufen", xcenter-mhw+30, vsx+(ld*mitems)+(ld/2)+20, (xcenter+mhw)-(xcenter-mhw-30), LEFT, SMALL, GREY);
cfb->RenderCircle( xcenter-mhw+110, vsx+(ld*mitems)+(ld/2)+5, BLUE);
cfb->RenderString("Rückwärtssuche", xcenter-mhw+30+110, vsx+(ld*mitems)+(ld/2)+20, (xcenter+mhw)-(xcenter-mhw-30), LEFT, SMALL, GREY);
if(rs_result)
{
cfb->RenderCircle( xcenter-mhw+270, vsx+(ld*mitems)+(ld/2)+5, YELLOW);
cfb->RenderString("Speichern", xcenter-mhw+30+270, vsx+(ld*mitems)+(ld/2)+20, (xcenter+mhw)-(xcenter-mhw-30), LEFT, SMALL, GREY);
}
}
cfb->FBPaint();
}
void CSubMenu::ShowMessage(int message, int popup)
{
printf("[%s] - %s %s(%d,%d)\n",BASENAME, __FILE__, __FUNCTION__, message, popup);
int mitte = xcenter;
int so = 5;
std::ostringstream msg;
//shadow
cfb->RenderBox(mitte+190, 178+so, mitte+200+so, 340, FILL, BLACK);
cfb->RenderBox(mitte-200+so, 300, mitte+200+so, 340+so, FILL, BLACK);
cfb->RenderBox(mitte-200, 178, mitte+200, 220, FILL, CMH);
cfb->RenderBox(mitte-200, 220, mitte+200, 340, FILL, CMC);
switch(message)
{
case INFO:
cfb->RenderString("Versionsinfo", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
msg.str("");
msg << "FritzInfoMonitor " << VERSION;
cfb->RenderString(msg.str().c_str(), mitte-180, 255, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
cfb->RenderString(COPYR, mitte-180, 290, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case INFO_ADDADR:
cfb->RenderString("Information", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Eintrag wurde hinzugefügt", mitte-180, 270, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case INFO_DIAL:
cfb->RenderString("Wählhilfe", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Bitte den Hörer abnehmen, oder warten", mitte-180, 255, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
cfb->RenderString("Sie, bis das Telefon klingelt.", mitte-180, 290, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case INFO_DIALTEST:
cfb->RenderString("Wählhilfe", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Das Telefon sollte jetzt klingeln", mitte-180, 270, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case INFO_PHONEBOOK:
cfb->RenderString("Information", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
msg.str("");
msg << "Telefonbuch " << subMenu[PHONEBOOK].sel+1 << " wird übertragen";
cfb->RenderString(msg.str().c_str(), mitte-180, 270, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case INFO_RSEARCH:
cfb->RenderString("GoYellow", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Leider haben wir nichts gefunden!", mitte-180, 270, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case INFO_RECONNECT :
cfb->RenderString("Information", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Neustart der Internetverbindung", mitte-180, 270, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case ERR_LOGIN:
cfb->RenderString("Fehler!", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Fehler bei der Anmeldung", mitte-180, 255, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
cfb->RenderString("Login nicht erfolgreich", mitte-180, 290, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case ERR_CONNECT:
cfb->RenderString("Fehler!", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Die Box ist nicht erreichbar", mitte-180, 255, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
cfb->RenderString(cpars->getFritzAdr(), mitte-180, 290, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
case LOAD:
cfb->RenderString("Information", mitte-180, 210, (mitte+180)-(mitte-180), CENTER, NORMAL, CMHT);
cfb->RenderString("Hole Daten von der FRITZ!Box ...", mitte-180, 270, (mitte+180)-(mitte-180), CENTER, NORMAL, CMCT);
break;
}
if(!popup)
{
cfb->RenderBox(mitte-50, 305, mitte+50, 330, FILL, CMHT);
cfb->RenderString("zurück", mitte-10, 325, 60, LEFT, SMALL, CMC);
cfb->PaintIcon(cicons->getIcon_ok(), mitte-40 ,305);
}
cfb->FBPaint();
}

45
archive-sources/FritzCallMonitor/FritzInfoMonitor/submenu.h

@ -1,45 +0,0 @@
#ifndef __submenu_h__
#define __submenu_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "icons.h"
#include <vector>
using namespace std;
class CSubMenu
{
public:
CSubMenu();
~CSubMenu();
static CSubMenu* getInstance();
void ShowMessage(int message, int popup);
void ShowSubMenu(int menu);
void CallerMenu(int rs_result, int callsel);
void DialMenu(int dialtest);
struct S_SUBMENU {
int sel;
int mwidth;
int mitems;
};
vector<S_SUBMENU> subMenu;
private:
CParser * cpars;
CConnect * cconnect;
Cfb * cfb;
CIcons * cicons;
// int callsel, rs_result, dialtest;
int bspace, lrspace, xwidth, yheight;
int xcenter, ycenter;
int ld, so;
};
#endif// __submenu_h__

6
archive-sources/FritzCallMonitor/FritzInfoMonitor_setup.cfg

@ -1,6 +0,0 @@
name=NI-FRITZ! FCM/FIM Setup
desc=FritzCallMonitor.cfg Konfigurationsplugin
type=4
needfb=1
needrc=1
needoffsets=1

548
archive-sources/FritzCallMonitor/FritzInfoMonitor_setup.lua

@ -1,548 +0,0 @@
-- Plugin to configure FritzCallMonitor.cfg
-- Copyright (C) 2014 NI-Team
function init()
caption="FritzCallMonitor Setup"
config="/var/tuxbox/config/FritzCallMonitor.cfg"
addressbook="/var/tuxbox/config/FritzCallMonitor.addr"
servicename="fritzcallmonitor"
flagfile=".fritzcallmonitor"
changed = 0
C={}
H={} -- hints
C["FRITZBOXIP"]="fritz.box"
H["FRITZBOXIP"]="Die IP-Adresse oder der Hostname deiner FRITZ!Box"
C["PORT"]=1012
H["PORT"]="Port 1012 der FRITZ!Box muss einmalig per Telefon aktiviert werden"
C["ADDRESSBOOK"]=addressbook
H["ADDRESSBOOK"]=""
C["EXEC"]=""
H["EXEC"]="Nach eingehendem Anruf, kann ein Script ausgeführt werden"
C["BACKWARDSEARCH"]=1
H["BACKWARDSEARCH"]="Rückwärtssuche über das Internet"
C["DEBUG"]=0
H["DEBUG"]="Startet den FCM zur Fehlersuche im Debugmodus"
C["MSGTYPE"]="nmsg"
H["MSGTYPE"]="Neutrino Nachrichtentyp Popup oder Message"
C["MSGTIMEOUT"]=""
H["MSGTIMEOUT"]="Maximale Anzeigedauer der Nachricht auf dem Bildschirm, bevor sie automatisch gelöscht wird. Keine Angabe = Neutrino default"
C["MSN_1"]=""
C["MSN_2"]=""
C["MSN_3"]=""
C["MSN_4"]=""
C["MSN_5"]=""
C["MSN_6"]=""
H["MSNMENU"]="MSN Rufnummern, die überwacht werden sollen. Wenn \"MSN_1\" frei bleibt, werden alle Rufnummern überwacht."
H["MSN"]="Ist hier eine Nummer eingetragen, reagiert der FCM bei einem eingehenden Anruf nur auf diese."
C["BOXIP_1"]="127.0.0.1"
C["BOXIP_2"]=""
C["BOXIP_3"]=""
C["BOXIP_4"]=""
H["BOXMENU"]="Einstellen der Adressen für die Neutrino-Boxen, auf denen ein eingehender Anruf angezeigt werden soll."
H["BOXIP"]="<BOXIP>:<Port> der Box, auf der die Nachricht angezeigt werden soll. Die Eingabe des Ports ist optional."
C["LOGON_1"]="root:coolstream"
C["LOGON_2"]=""
C["LOGON_3"]=""
C["LOGON_4"]=""
H["LOGON"]="<Name>:<Passwort> für das yWeb der entsprechenden Box, auf der die Nachricht angezeigt werden soll."
C["EASYMODE"]=0
H["EASYMODE"]="Einschalten wenn eine EasyBox statt einer Fritz!Box genutzt wird"
C["PASSWD"]=""
H["PASSWD"]="Das auf der Fritz!Box angegebene Passwort"
C["CITYPREFIX"]=""
H["CITYPREFIX"]="Bei Übernahme der FB Telefonbücher kann eine fehlende Vorwahl automatisch mit der hier eingetragenen Ortsvorwahl ergänzt werden."
C["DIALPREFIX"]=""
H["DIALPREFIX"]="Wenn die Wählhilfe verwendet wird (FIM), kann hier die Wählprefix verwendet werden (*111# stellt eine Verbindung ins Festnetz her)."
C["PORT_1"]="Fon 1, 1"
C["PORT_2"]="Fon 2, 2"
C["PORT_3"]="Fon 3, 3"
C["PORT_4"]="ISDN & DECT, 50"
C["PORT_5"]="ISDN 1, 51"
C["PORT_6"]="ISDN 2, 52"
C["PORT_7"]="DECT 1, 610"
C["PORT_8"]="DECT 2, 611"
H["DIALHELPER"]="Wählhilfe Ports, werden in der Auswahl des Menüs \"Wählhilfe\" (FIM) ausgegeben"
H["PORT"]="<Name>, <Nummer> des Gerätes in der FritzBox"
H["SEARCH_MODE_MENU"]="Wenn Nachrichten auf dem FRITZ-Anrufbeantworter vorliegen, kann mit einem NI-Image eine Info eingeblendet werden (NI-Infobar)"
C["SEARCH_MODE"]=0
H["SEARCH_MODE"]="Schaltet die Abfrage ein/aus"
C["SEARCH_QUERY"]="&var=tam:settings/TAM0/NumNewMessages"
H["SEARCH_QUERY"]="Querystring für die Abfrage des Anrufbeantworters. Liegen gespeicherte Nachrichten vor, wird das Flagfile gesetzt."
C["SEARCH_INT"]=300
H["SEARCH_INT"]="Intervall für die Suchabfrage (Query)"
C["AD_FLAGFILE"]="/var/etc/.call"
H["AD_FLAGFILE"]="Ist der Query erfolgreich, wird dieses Flagfile für die Anzeige in den NI-Infoicons gesetzt"
-- maybe todo --
C["CALLERLIST_STR"]="getpage=..%2Fhtml%2Fde%2FFRITZ%21Box_Anrufliste.csv"
C["CALLERLIST_FILE"]="/tmp/FRITZ!Box_Anrufliste.csv"
end -- init
-- ---------------------------------------------------------------------------
function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
function load()
local f = io.open(config, "r")
if f then
for line in f:lines() do
local key, val = line:match("^([^=#]+)=([^\n]*)")
if (key) then
if (val == nil) then
val=""
end
C[trim(key)]=trim(val)
end
end
f:close()
end
end
function check_for_restart()
local f = io.open("/var/etc/"..flagfile, "r")
if f == nil then
io.open("/etc/"..flagfile, "r")
end
if f ~= nil then
f:close()
os.execute("service "..servicename.." stop")
os.execute("sleep 1")
os.execute("service "..servicename.." start")
end
end
function save()
if (changed == 1) then
changed = 0
local h = hintbox.new{caption="Einstellungen werden gespeichert", text="Bitte warten ..."}
h:paint()
local f = io.open(config, "w")
if f then
f:write(
[[
# Der Port 1012 der FRITZBox muss einmalig per Telefon (analog!) aktiviert werden:
# Telefoncode zum öffnen des TCP-Ports: #96*5*
# Telefoncode zum schließen des TCP-Ports: #96*4*
# Diese Funktion wir ab der Firmware Version xx.03.99 von AVM unterstützt.
# IP von deiner Fritzbox und port
FRITZBOXIP=]].. C["FRITZBOXIP"] .. "\n" ..[[
PORT=]].. C["PORT"] .. "\n" ..[[
# Addressbuch File
ADDRESSBOOK=]].. C["ADDRESSBOOK"] .. "\n" ..[[
# Pfadangabe für den Aufruf eines Scripts.
# Nach eingehendem Anruf, kann ein Script ausgeführt werden,
# durch die z.B. die Lautstärke den Box herunter geregelt wird.
# Als Parameter wird der Inhalt der Nachricht, die auch über
# die Box ausgegeben wird, übergeben.
# Dieses Script muss natürlich vorhanden und ausführbar sein.
# Es wird per default kein Script mitgeliefert.
EXEC=]].. C["EXEC"] .. "\n" ..[[
# Rückwärtssuche über das Internet
BACKWARDSEARCH=]].. C["BACKWARDSEARCH"] .. "\n" ..[[
# Debug Ausgaben
DEBUG=]].. C["DEBUG"] .. "\n" ..[[
# Neutrino Nachrichtentyp Popup (popup) oder Message (nmsg)
MSGTYPE=]].. C["MSGTYPE"] .. "\n" ..[[
# Maximale Anzeigedauer der Nachricht auf dem Bildschirm, bevor sie automatisch gelöscht wird.
# Ist hier kein Wert eingetragen, wird der Neutrino default genommen (ab Revision 1782).
MSGTIMEOUT=]].. C["MSGTIMEOUT"] .. "\n" ..[[
# MSN Rufnummern, die überwacht werden sollen. Wenn "MSN_1" frei bleibt, werden alle Rufnummern überwacht.
# Optional kann auch der Name angegeben werden. Die Eingabe erfolgt dann <MSN>|<NAME>.
MSN_1=]].. C["MSN_1"] .. "\n" ..[[
MSN_2=]].. C["MSN_2"] .. "\n" ..[[
MSN_3=]].. C["MSN_3"] .. "\n" ..[[
MSN_4=]].. C["MSN_4"] .. "\n" ..[[
MSN_5=]].. C["MSN_5"] .. "\n" ..[[
MSN_6=]].. C["MSN_6"] .. "\n" ..[[
# IP Adresse der Box. Die erste Adresse sollte 127.0.0.1 sein (die Box auf dem der FritzCallMonitor läuft).
# Optional kann auch der Port angegeben werden. Die Eingabe erfolgt dann <BOXIP>:<Port>. Der Standardport ist 80
BOXIP_1=]].. C["BOXIP_1"] .. "\n" ..[[
BOXIP_2=]].. C["BOXIP_2"] .. "\n" ..[[
BOXIP_3=]].. C["BOXIP_3"] .. "\n" ..[[
BOXIP_4=]].. C["BOXIP_4"] .. "\n" ..[[
# Name und Passwort (Name:Passwort) für das yWeb der entsprechenden Box
LOGON_1=]].. C["LOGON_1"] .. "\n" ..[[
LOGON_2=]].. C["LOGON_2"] .. "\n" ..[[
LOGON_3=]].. C["LOGON_3"] .. "\n" ..[[
LOGON_4=]].. C["LOGON_4"] .. "\n" ..[[
# Wenn der CallMonitor in Verbindung mit einer Eeasybox eingesetzt wird "1" sonst immer "0"
EASYMODE=]].. C["EASYMODE"] .. "\n" ..[[
# Passwort für die !FritzBox (Achtung - nur neues Loginverfahren mit SID)
PASSWD=]].. C["PASSWD"] .. "\n" ..[[
# Bei der Übernahme der !FritzBox-Telefonbücher mit den FritzInfolMonitor (FIM),
# kann eine fehlende Vorwahl automatisch mit der hier eingetragenen Ortsvorwahl ergänzt werden.
CITYPREFIX=]].. C["CITYPREFIX"] .. "\n" ..[[
# Wenn die Wählhilfe verwendet wird (FIM), kann hier die Wählprefix verwendet werden.
# Das Beispiel DIALPREFIX=*111# stellt eine Verbindung ins Festnetz her.
DIALPREFIX=]].. C["DIALPREFIX"] .. "\n" ..[[
# Wählhilfe Ports, werden in der Auswahl des Menüs "Wählhilfe" (FIM) ausgegeben
# Name Port Intern
# ------------------------------
# "Fon 1", 1, "**1"
# "Fon 2", 2, "**2"
# "Fon 3", 3, "**3"
# "ISDN & DECT", 50, "**50"
# "ISDN 1", 51, "**51"
# "ISDN 2", 52, "**52"
# "ISDN 3", 53, "**53"
# "ISDN 4", 54, "**54"
# "ISDN 5", 55, "**55"
# "DECT 1", 610, "**610"
# "DECT 2", 611, "**611"
# "DECT 3", 612, "**612"
# "DECT 4", 613, "**613"
# "DECT 5", 614, "**614"
# "SIP 1", 620, "**620"
# "SIP 2", 621, "**621"
# "SIP 3", 622, "**622"
# "SIP 4", 623, "**623"
# "SIP 5", 624, "**624"
#
# Maximal sind 8 Einträge möglich.
# Dabei ist folgender Syntax einzuhalten:
# PORT_x=Name,Port
PORT_1=]].. C["PORT_1"] .. "\n" ..[[
PORT_2=]].. C["PORT_2"] .. "\n" ..[[
PORT_3=]].. C["PORT_3"] .. "\n" ..[[
PORT_4=]].. C["PORT_4"] .. "\n" ..[[
PORT_5=]].. C["PORT_5"] .. "\n" ..[[
PORT_6=]].. C["PORT_6"] .. "\n" ..[[
PORT_7=]].. C["PORT_7"] .. "\n" ..[[
PORT_8=]].. C["PORT_8"] .. "\n" ..[[
# Strings zum senden an die !FritzBox, Die Quelle hierfür ist:
# http://www.wehavemorefun.de/fritzbox/index.php/Anrufliste_von_der_Box_holen
# Anrufliste (CSV) herunterladen
CALLERLIST_STR=]].. C["CALLERLIST_STR"] .. "\n" ..[[
# Speicherort für die Anrufliste auf der Coolstream
CALLERLIST_FILE=]].. C["CALLERLIST_FILE"] .. "\n" ..[[
# 0 = AUS [default]
# 1 = An die FRITZ!Box wird eine Query-Abfrage gesendet
SEARCH_MODE=]].. C["SEARCH_MODE"] .. "\n" ..[[
# Querystring für die Abfrage der FRITZ!Box.
# Die Abfrage, ob neue Nachrichten vorhanden sind, wurde mit der Firmware Version 29.04.87 getestet.
# In älteren Versionen scheint die FB keine Information darüber bereit zu stellen.
#
# Liefert der Query "0" zurück, wird das Flagfile (AD_FLAGFILE) gelöscht.
# Ist das Ergebnis ungleich "0", wird das Flagfile (AD_FLAGFILE) erzeugt.
# default SEARCH_QUERY=&var=tam:settings/TAM0/NumNewMessages
SEARCH_QUERY=]].. C["SEARCH_QUERY"] .. "\n" ..[[
# Intervall in Sekunden, für die Suchabfrage in der Startseite der FRITZ!Box
# default SEARCH_INT=300
SEARCH_INT=]].. C["SEARCH_INT"] .. "\n" ..[[
# Standard im NI-Image ist /var/etc/.call
# default AD_FLAGFILE=/var/etc/.call
AD_FLAGFILE=]].. C["AD_FLAGFILE"] .. "\n" ..[[
]]
)
f:close()
check_for_restart()
local i = 0
repeat
i = i + 1
msg, data = n:GetInput(500)
until msg == RC.ok or msg == RC.home or i == 2
end
h:hide()
end
end
function handle_key(a)
if (changed == 0) then
return MENU_RETURN["EXIT"]
end
local res = messagebox.exec{title="Änderungen verwerfen?", text="Sollen die Änderungen verworfen werden?", buttons={ "yes", "no" } }
if (res == "yes") then
return MENU_RETURN["EXIT"]
else
return MENU_RETURN["REPAINT"]
end
end
function reset()
local res = messagebox.exec{title="Standardeinstellungen laden", text="Sollen die Standardeinstellungen geladen werden?", buttons={ "yes", "no" } }
if (res == "yes") then
init()
changed=1
-- ugly but it's works --
m:hide()
m = {}
m_menu("main")
return MENU_RETURN["EXIT_ALL"]
end
return MENU_RETURN["REPAINT"]
end
on="ein"
off="aus"
function num2onoff(a)
if (tonumber(a) == 0) then
return off
else
return on
end
end
function onoff2num(a)
if (a == on) then
return 1
else
return 0
end
end
function set_onoff(k, v)
if (C[k] ~= onoff2num(v)) then
C[k]=onoff2num(v)
changed=1
end
end
yes="ja"
no="nein"
function num2yesno(a)
if (tonumber(a) == 0) then
return no
else
return yes
end
end
function yesno2num(a)
if (a == yes) then
return 1
else
return 0
end
end
function set_yesno(k, v)
if (C[k] ~= yesno2num(v)) then
C[k]=yesno2num(v)
changed=1
end
end
function set_string(k, v)
if (C[k] ~= v) then
C[k]=v
changed=1
end
end
function get_desc_from_table(t, v)
local __d = ""
for _v, _w in ipairs(t) do
if (_w.value == v) then
__d = _w.desc
break
end
end
return __d
end
-- ---------------------------------------------------------------------------
table_MSGTYPE = {
{ value = "nmsg", desc = "Message" },
{ value = "popup", desc = "Popup" }
}
descs_MSGTYPE = {}
for v, w in ipairs(table_MSGTYPE) do
descs_MSGTYPE[v] = w.desc
end
-- ---------------------------------------------------------------------------
table_DEBUG = {
{ value = "0", desc = "aus" },
{ value = "1", desc = "Level 1" },
{ value = "2", desc = "Level 2" }
}
descs_DEBUG = {}
for v, w in ipairs(table_DEBUG) do
descs_DEBUG[v] = w.desc
end
-- ---------------------------------------------------------------------------
switch_table = {
["MSGTYPE"] = function (x) return table_MSGTYPE end,
["DEBUG"] = function (x) return table_DEBUG end,
}
function set_table(k, v)
local __v
for _v, _w in ipairs(switch_table[k]()) do
if (_w.desc == v) then
__v = _w.value
break
end
end
C[k]=__v
changed=1
end
-- ---------------------------------------------------------------------------
function msn_menu(id)
local msn = menu.new{name="MSN Einstellungen", icon="settings"}
msn:addKey{directkey=RC["home"], id="home", action="handle_key"}
msn:addKey{directkey=RC["setup"], id="setup", action="handle_key"}
msn:addItem{type="separator"}
msn:addItem{type="back"}
msn:addItem{type="separatorline"}
for i=1,6 do
msn:addItem{type="stringinput", action="set_string", id="MSN_"..i.."", value=C["MSN_"..i..""], hint=H["MSN"] ,valid_chars="0123456789 ", directkey=RC[""..i..""], name="Rufnummer "..i..""}
end
msn:exec()
end
function box_menu(id)
local box = menu.new{name="Box Einstellungen", icon="settings"}
box:addKey{directkey=RC["home"], id="home", action="handle_key"}
box:addKey{directkey=RC["setup"], id="setup", action="handle_key"}
box:addItem{type="separator"}
box:addItem{type="back"}
box:addItem{type="separatorline"}
for i=1,4 do
box:addItem{type="stringinput", action="set_string", id="BOXIP_"..i.."", value=C["BOXIP_"..i..""], hint=H["BOXIP"], valid_chars="0123456789.: ", directkey=RC[""..i..""], name="Box "..i.." IP"}
box:addItem{type="keyboardinput", action="set_string", id="LOGON_"..i.."", value=C["LOGON_"..i..""], hint=H["LOGON"], name="Box "..i.." Login"}
if i < 4 then
box:addItem{type="separator"}
end
end
box:exec()
end
function port_menu(id)
local msn = menu.new{name="Wählhilfe", icon="settings"}
msn:addKey{directkey=RC["home"], id="home", action="handle_key"}
msn:addKey{directkey=RC["setup"], id="setup", action="handle_key"}
msn:addItem{type="separator"}
msn:addItem{type="back"}
msn:addItem{type="separatorline"}
for i=1,8 do
msn:addItem{type="keyboardinput", action="set_string", id="PORT_"..i.."", value=C["PORT_"..i..""], hint=H["PORT"], directkey=RC[""..i..""], name="Wählhilfe "..i..""}
end
msn:exec()
end
function query_menu(id)
local query = menu.new{name="Anrufbeantworter", icon="settings"}
query:addKey{directkey=RC["home"], id="home", action="handle_key"}
query:addKey{directkey=RC["setup"], id="setup", action="handle_key"}
query:addItem{type="separator"}
query:addItem{type="back"}
query:addItem{type="separatorline"}
query:addItem{type="chooser", action="set_yesno", options={ yes, no }, id="SEARCH_MODE", hint=H["SEARCH_MODE"], value=num2yesno(C["SEARCH_MODE"]), name="Query-Abfrage"}
query:addItem{type="keyboardinput", action="set_string", id="SEARCH_QUERY", value=C["SEARCH_QUERY"], hint=H["SEARCH_QUERY"], name="Query-String"}
query:addItem{type="stringinput", action="set_string", id="SEARCH_INT", value=C["SEARCH_INT"], hint=H["SEARCH_INT"], valid_chars="0123456789 ", name="Abfrageintervall"}
query:addItem{type="keyboardinput", action="set_string", id="AD_FLAGFILE", value=C["AD_FLAGFILE"], hint=H["AD_FLAGFILE"], name="Signaldatei"}
query:exec()
end
function pwd_menu(id)
local pwd = menu.new{name="FRITZ!Box Passwort", icon="settings"}
pwd:addKey{directkey=RC["home"], id="home", action="handle_key"}
pwd:addKey{directkey=RC["setup"], id="setup", action="handle_key"}
pwd:addItem{type="separator"}
pwd:addItem{type="back"}
pwd:addItem{type="separatorline"}
pwd:addItem{type="keyboardinput", action="set_string", id="PASSWD", value=C["PASSWD"], name="Passwort"}
pwd:exec()
end
function m_menu(id)
m = menu.new{name=caption, icon="settings"}
m:addKey{directkey=RC["home"], id="home", action="handle_key"}
m:addKey{directkey=RC["setup"], id="setup", action="handle_key"}
m:addItem{type="separator"}
m:addItem{type="cancel"}
m:addItem{type="separatorline"}
m:addItem{type="forwarder", name="Speichern", action="save", icon="rot", directkey=RC["red"]}
m:addItem{type="separatorline"}
m:addItem{type="keyboardinput", action="set_string", id="FRITZBOXIP", value=C["FRITZBOXIP"], hint=H["FRITZBOXIP"], name="FRITZ!Box IP/Name"}
m:addItem{type="stringinput", action="set_string", id="PORT", value=C["PORT"], hint=H["PORT"], valid_chars="0123456789 ", name="FRITZ!Box Port"}
m:addItem{type="forwarder", name="Passwort eingeben", action="pwd_menu", hint=H["PASSWD"], id="PWD"}
m:addItem{type="separator"}
m:addItem{type="chooser", action="set_yesno", options={ yes, no }, id="EASYMODE", hint=H["EASYMODE"], value=num2yesno(C["EASYMODE"]), name="EasyBox statt FRITZ!Box"}
m:addItem{type="separatorline"}
m:addItem{type="chooser", action="set_yesno", options={ yes, no }, id="BACKWARDSEARCH", hint=H["BACKWARDSEARCH"], value=num2yesno(C["BACKWARDSEARCH"]), name="Rückwärtsuche"}
m:addItem{type="chooser", directkey=RC["green"], icon="gruen", action="set_table", options=descs_DEBUG, id="DEBUG", hint=H["DEBUG"], value=get_desc_from_table(table_DEBUG, C["DEBUG"]), name="Debugmodus"}
m:addItem{type="stringinput", action="set_string", id="CITYPREFIX", value=C["CITYPREFIX"], hint=H["CITYPREFIX"], valid_chars="0123456789 ", name="Ortsvorwahl", size="7"}
m:addItem{type="stringinput", action="set_string", id="DIALPREFIX", value=C["DIALPREFIX"], hint=H["DIALPREFIX"], valid_chars="0123456789 ", name="Wählprefix", size="7"}
m:addItem{type="separator"}
m:addItem{type="filebrowser", action="set_string", id="ADDRESSBOOK", value=C["ADDRESSBOOK"], hint=H["ADDRESSBOOK"], name="Adressbuch"}
m:addItem{type="filebrowser", action="set_string", id="EXEC", value=C["EXEC"], hint=H["EXEC"], name="Script starten"}
m:addItem{type="separatorline"}
m:addItem{type="chooser", action="set_table", options=descs_MSGTYPE, id="MSGTYPE", value=get_desc_from_table(table_MSGTYPE, C["MSGTYPE"]), hint=H["MSGTYPE"], name="Benachrichtung"}
m:addItem{type="stringinput", action="set_string", id="MSGTIMEOUT", value=C["MSGTIMEOUT"], hint=H["MSGTIMEOUT"], valid_chars="0123456789 ", name="Message Timeout"}
m:addItem{type="separatorline"}
m:addItem{type="forwarder", name="MSN Einstellungen", action="msn_menu", hint=H["MSNMENU"], id="MSN"}
m:addItem{type="forwarder", name="Box Einstellungen", action="box_menu", hint=H["BOXMENU"], id="BOX"}
m:addItem{type="forwarder", name="Wählhilfen", action="port_menu", hint=H["DIALHELPER"], id="PORT"}
m:addItem{type="forwarder", name="Statusabfrage des Anrufbeantworters", action="query_menu", hint=H["SEARCH_MODE_MENU"], id="PORT"}
m:addItem{type="separatorline"}
m:addItem{type="forwarder", name="Standardeinstellungen laden", action="reset", hint="Aktuelle Einstellungen verwerfen und die Standardeinstellungen laden" }
m:exec()
end
-- MAIN ----------------------------------------------------------------------
n = neutrino()
init()
load()
m_menu("main")

BIN
archive-sources/FritzCallMonitor/FritzInfoMonitor_setup_hint.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

BIN
archive-sources/FritzCallMonitor/Technical_Note_Session_ID.pdf

Binary file not shown.

BIN
archive-sources/FritzCallMonitor/Technical_Note_Session_ID_ab_OS_5.5.pdf

Binary file not shown.

1132
archive-sources/FritzCallMonitor/connect.cpp

File diff suppressed because it is too large

97
archive-sources/FritzCallMonitor/connect.h

@ -1,97 +0,0 @@
#ifndef __connect_h__
#define __connect_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
using namespace std;
class CConnect
{
public:
CConnect();
~CConnect();
static CConnect* getInstance();
struct device {
string identifier;
string productname;
string name;
string mode;
int present;
int state;
int lock;
int power;
int energy;
int celsius;
int offset;
int tist;
int tsoll;
int absenk;
int komfort;
};
vector<device> devices;
int connect2Host(const char *adr, int port);
int get2box(const char* host, int port, const char* msg, const char* upwd, const char* msgtype, int msgtimeout);
int get_login(const char* fritzPW);
int send_refresh(const char *sid);
int get_callerlist(const char *sid, const char *file);
int send_logout(const char *sid);
int send_TAMquery(const char* flag, const char *sid, const char *searchstr);
int my_atoi(const std::string text);
string itoString (int& i);
int smartHome(const char *sid, const char *command, const std::string ain = "");
void get_time(int *wday,int *hour,int *min);
void parseXML(const string text);
void StringReplace(string &str, const string search, const string rstr);
int inTime(int index, vector<vector<string> >& week, vector<vector<string> >& day);
// this is the "old" way for FRITZ!DECT
void checkdevice(vector<string>& dectid, vector<int>& temp, vector< vector<string> >& week, vector< vector<string> >& day);
// check Comet DECT device
int checkdevice(map<string, vector<string> >& w, map<string, vector<string> >& t);
virtual void cleardevice(){ devices.clear(); };
string timestamp();
string query2fritz(const char* command);
string parseString(const char* var, string& string_to_serarch);
string parseString(string search1, string search2, string str);
string post2fritz(const char* url, int port = 80, const string data = "", const string curlOutFile = "");
virtual void setDebug(const int Debug){debug = Debug;};
virtual const char* getSid(){return sid;};
virtual void setFritzAdr(const char* Adr){FritzAdr = Adr;};
virtual void setFritzPort(const int Port){FritzWebPort = Port;};
private:
FILE *r_fritz;
FILE *w_fritz;
//int sockfb;
int debug;
char challenge[20];
char sid[20];
int FritzWebPort;
const char* FritzAdr;
unsigned char digest[16];
unsigned char md5sum[33];
int get_challenge();
int get_md5(const char *challenge, char *FritzPW);
int get_sid(const char *challenge, const unsigned char *md5);
int get_sid_LUA(const char *challenge, const unsigned char *md5);
int get_challenge(const char* host, int port,const char* fritzPW);
void setFlag(const char *flag, const int& i);
// send command to DECT actor
void send2actor(const unsigned int& inx, int& t_soll);
char *trim(char *txt);
char *UTF8toISO(char *txt);
int ExistFile(const char *fname);
int TouchFile(const char *fname);
};
#endif //__connect_h__

19
archive-sources/FritzCallMonitor/fritzcallmonitor.init

@ -1,19 +0,0 @@
#!/bin/sh
. /etc/init.d/globals
case $1 in
start)
if [ -e /var/etc/.fritzcallmonitor ]; then
SHOWINFO "starting ..."
/bin/FritzCallMonitor &
fi
;;
stop)
SHOWINFO "stopping ..."
killall FritzCallMonitor
;;
*)
echo "[${BASENAME}] Usage: $0 {start|stop}"
;;
esac

BIN
archive-sources/FritzCallMonitor/hint_FritzCallMonitor.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Loading…
Cancel
Save