PDA

View Full Version : AzboxHD CCcam info 2032 Frimware work



kanber_kav
04-06-2009, 11:45 AM
Azbox için CCcam info

frimware 2032 içindir.

http://www.mediafire.com/?sharekey=b377b5cb669eb7ac0de4fc1 039a01674e1431f8b9ad6ebc1ce018c81 14394287

Kurulum
CCcaminfo klasörünü /EMU dizinine atın. telnetten /EMU/CCcaminfo dizinine girerek chmod 755 * yapın yada
ftp den 755 yapın. Plugins menusünden kullanabilirsiniz. Beta versiyonudur.

http://img530.imageshack.us/img530/3719/dc090604001.jpg


http://img189.imageshack.us/img189/4517/dc090604002.jpg

iko
04-06-2009, 12:01 PM
CcCam info for azbox by Kanber_KaV (fw 2032 required!!!)

Installation :
Send the folder to the /EMU by FTP
set the chmod to 755 (all files)
thats it!!!

You can access it by plug-ins menu ...
p.s it's still at beta stage

Enjoy ;)
Kanber_Kav

kanber_kav
06-06-2009, 06:26 PM
frimware 0.9.2238 runing CCcaminfo hehee

kanber_kav
06-06-2009, 07:00 PM
CCcam info source

CCcaminfo.c

/*
*DreamVDR CCcam info version 1.0 source kod
* isteyen istediği gibi değiştirebilir.
* Nano-X GrGrabKey() demo program.
*
* Copyright(C) 2003 Jon Foster <jon@jon-foster.co.uk>
* Based on demo2.c
*
* This program allows the GrGrabKey() API to be tested.
* It creates a window, and displays key and hotkey events it recieves
* in that window. At startup it registers a key with GrGrabKey().
* The key and the registration type can both be specified on the
* command line.
*
* Usage:
* grabdemo key {n|h|x|s}
* Key is numerical MWKEY value (default 55='a').
* The second parameter is a single letter indicating the reservation
* type. Valid values:
* n - Normal (GR_GRAB_HOTKEY_EXCLUSIVE) (default)
* h - Hotkey (GR_GRAB_HOTKEY)
* x - eXclusive (GR_GRAB_EXCLUSIVE)
* m - Mouse (GR_GRAB_EXCLUSIVE_MOUSE)
*/

#define MWINCLUDECOLORS
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <nano-X.h>
#include <signal.h>
#include <string.h>

static GR_WINDOW_ID main_window;
static GR_GC_ID main_gc;
static char message1[100] = "--- CCcam Info By KKav ---Beta V1.0";
char message2[100][300] ;

int kartim;
#define WIDTH 600
#define HEIGHT 400 //CİZİM ALANI BELİRLE
char server[1000][200];
char mevcut[1000][200];
char anahtar1[1000][9];
char anahtar2[1000][9];
int bulunans;
int bulunana1[1000];
int bulunanb1[1000];
static int Toplam;
int k,adim;




typedef struct {

const char *name;
int mode;
// key translation pattern
// 0=DOWN/DOWN/.../UP
// 1=DOWN/DOWN/.../LONG/UP
// 2=DOWN/.../LONG/.../UP
// 3=.../LONG --> DOWN+UP or .../UP --> DOWN/UP
int count;
int key[2];
unsigned short mwkey;

}keys_map_td210;

#define MAX_KEY 60
keys_map_td210 keys_td210[MAX_KEY] = {
{ "MWKEY_ASCII_0", 0, 3, { 0, 4 }, '0'}, // 0 T0
{ "MWKEY_ASCII_1", 0, 3, { 1, 5 }, '1'}, // 1 T1
{ "MWKEY_ASCII_2", 0, 3, { 2, 6 }, '2'}, // 2 T2
{ "MWKEY_ASCII_3", 0, 3, { 3, 7 }, '3'}, // 3 T3
{ "MWKEY_ASCII_4", 0, 3, { 4, 8 }, '4'}, // 4 T4
{ "MWKEY_ASCII_5", 0, 3, { 5, 9 }, '5'}, // 5 T5
{ "MWKEY_ASCII_6", 0, 3, { 6, 10 }, '6'}, // 6 T6
{ "MWKEY_ASCII_7", 0, 3, { 7, 11 }, '7'}, // 7 T7
{ "MWKEY_ASCII_8", 0, 3, { 8, 12 }, '8'}, // 8 T8
{ "MWKEY_ASCII_9", 0, 3, { 9, 13 }, '9'}, // 9 T9
{ "MWKEY_CHANNEL_UP", 0, 3, { 10, 16 }, MWKEY_CHANNEL_UP}, // A CHUP
{ "MWKEY_CHANNEL_DOWN", 0, 3, { 11, 17 }, MWKEY_CHANNEL_DOWN}, // B CHDOWN
{ "Not Allowed", 0, 3, { 12, 18 }, 0}, // C VOLDOWN
{ "Not Allowed", 0, 3, { 13, 19 }, 0}, // D VOLUP
{ "Not Allowed", 2, 6, { 14, 20 }, 0}, // E MUTE
{ "MWKEY_UNKNOWN", 0, 3, { 15, 0 }, MWKEY_UNKNOWN}, // F NONE
{ "MWKEY_ENTER", 0, 3, { 16, 21 }, MWKEY_ENTER}, // 10 OK
{ "MWKEY_MENU", 0, 3, { 17, 22 }, MWKEY_MENU}, // 11 MENU
{ "MWKEY_UP", 0, 3, { 18, 23 }, MWKEY_UP}, // 12 UP
{ "MWKEY_DOWN", 0, 3, { 19, 24 }, MWKEY_DOWN}, // 13 DOWN
{ "MWKEY_LEFT", 0, 3, { 20, 25 }, MWKEY_LEFT}, // 14 LEFT
{ "MWKEY_RIGHT", 0, 3, { 21, 26 }, MWKEY_RIGHT}, // 15 RIGHT
{ "MWKEY_ESCAPE", 0, 3, { 22, 28 }, MWKEY_ESCAPE}, // 16 EXIT
{ "MWKEY_REWIND", 0, 3, { 23, 34 }, MWKEY_REWIND}, // 17 REW
{ "MWKEY_STOP", 0, 3, { 24, 35 }, MWKEY_STOP}, // 18 STOP
{ "MWKEY_PLAY", 0, 3, { 25, 36 }, MWKEY_PLAY}, // 19 PLAY
{ "MWKEY_FAST_FWD", 0, 3, { 26, 37 }, MWKEY_FAST_FWD}, // 1A FWD
{ "MWKEY_TRACK_PREV", 0, 3, { 27, 38 }, MWKEY_TRACK_PREV}, // 1B PREV
{ "MWKEY_TRACK_NEXT", 0, 3, { 28, 39 }, MWKEY_TRACK_NEXT}, // 1C NEXT
{ "MWKEY_RECORD", 0, 3, { 29, 40 }, MWKEY_RECORD}, // 1D RECORD
{ "MWKEY_BACKSPACE", 0, 3, { 30, 14 }, MWKEY_BACKSPACE}, // 1E DEL
{ "MWKEY_UNKNOWN", 0, 3, { 31, 0 }, MWKEY_UNKNOWN}, // 1F NONE
{ "MWKEY_CAPSLOCK", 0, 3, { 32, 15 }, MWKEY_CAPSLOCK}, // 20 CAPS
{ "MWKEY_COLORED_KEY_0", 0, 3, { 33, 58 }, MWKEY_COLORED_KEY_0}, // 21 RED
{ "MWKEY_COLORED_KEY_1", 0, 3, { 34, 59 }, MWKEY_COLORED_KEY_1}, // 22 GREEN
{ "MWKEY_COLORED_KEY_2", 0, 3, { 35, 60 }, MWKEY_COLORED_KEY_2}, // 23 YELLOW
{ "MWKEY_COLORED_KEY_3", 0, 3, { 36, 61 }, MWKEY_COLORED_KEY_3}, // 24 BLUE
{ "MWKEY_GUIDE", 0, 3, { 37, 41 }, MWKEY_GUIDE}, // 25 Guide
{ "MWKEY_F1", 0, 3, { 38, 30 }, MWKEY_F1}, // 26 CHECK
{ "Not Allowed", 0, 3, { 39, 56 }, 0}, // 27 RESOL
{ "MWKEY_INFO", 0, 3, { 40, 47 }, MWKEY_INFO}, // 28 INFO
{ "MWKEY_F2", 0, 3, { 41, 57 }, MWKEY_F2}, // 29 TVRADIO
{ "MWKEY_UNKNOWN", 2, 7, { 42, 1 }, MWKEY_UNKNOWN}, // 2A Power
{ "MWKEY_HOME", 2, 3, { 43, 46 }, MWKEY_HOME}, // 2B Home
{ "Not Allowed", 0, 3, { 44, 53 }, 0}, // 2C UHF
{ "Not Allowed", 0, 3, { 45, 54 }, 0}, // 2D AUX
{ "Not Allowed", 0, 3, { 46, 55 }, 0}, // 2E USB Eject
{ "MWKEY_F3", 0, 3, { 47, 29 }, MWKEY_F3}, // 2F Search
/* New Key */
{ "MWKEY_ESCAPE", 0, 3, { 48, 63 }, MWKEY_ESCAPE}, // 30 UTUBE
{ "MWKEY_ESCAPE", 0, 3, { 49, 64 }, MWKEY_ESCAPE}, // 31 WWW
{ "MWKEY_ESCAPE", 0, 3, { 50, 65 }, MWKEY_ESCAPE}, // 32 EMAIL
/* Front Key */
{ "MWKEY_UP", 0, 3, { 51, 44 }, MWKEY_UP}, // 33 ---UP
{ "MWKEY_DOWN", 0, 3, { 52, 45 }, MWKEY_DOWN}, // 34 ---DOWN
{ "MWKEY_LEFT", 3, 3, { 53, 42 }, MWKEY_LEFT}, // 35 ---LEFT
{ "MWKEY_RIGHT", 3, 3, { 54, 43 }, MWKEY_RIGHT}, // 36 ---RIGHT
{ "MWKEY_HOME", 0, 3, { 55, 46 }, MWKEY_HOME}, // 37 ---LAN(HOME)
//{ "K_LAN__", 0, 3, { 55, 62 }, }, // 37 ---LAN(HOME)
/* Virtual Key */
{ "MWKEY_ESCAPE", 0, 3, { 56, 49 }, MWKEY_ESCAPE}, // 38 SLEEP
{ "MWKEY_ESCAPE", 0, 3, { 57, 50 }, MWKEY_ESCAPE}, // 39 WAKEUP
{ "", 0, 3, { 58, 51 }, MWKEY_UNKNOWN}, // 40 VSLEEP
{ "", 0, 3, { 59, 52 }, MWKEY_UNKNOWN}, // 41 VWAKEUP
};

/* A counter - used so you can see the display being updated. */
static int getSerialNumber(void)
{
static int serial = 0;
if (++serial >= 1000)
serial = 0;
return serial;
}

/* If a character is ASCII, return it, else return a question mark. */
static char keyToChar(int key)
{
if ((key >= 32) && (key <= 127)) {
return (char)key;
} else {
return '?';
}
}

/* Makes a GrGrabKey() type paramater into a human-readable string */
static const char *grabKindName(int kind)
{
switch (kind) {
case GR_GRAB_HOTKEY_EXCLUSIVE:
return "GR_GRAB_HOTKEY_EXCLUSIVE";
case GR_GRAB_HOTKEY:
return "GR_GRAB_HOTKEY";
case GR_GRAB_EXCLUSIVE:
return "GR_GRAB_EXCLUSIVE";
case GR_GRAB_EXCLUSIVE_MOUSE:
return "GR_GRAB_EXCLUSIVE_MOUSE";
default:
return "Invalid GR_GRAB_ mode";
}
}

/* Repaint a specified area of the window */
int repaint(int x, int y, int width, int height,int Topla)
{ //Sistem ekrana yazırılıyor
GrSetGCForeground(main_gc, GR_RGB(100,50,255) );//Arka platform rengi
GrFillRect(main_window, main_gc, x, y, width, height);//içi boyalı dikdörtgen
GrSetGCForeground(main_gc, GR_RGB(255,255,255)); //BUSEKİLDEDE YAZILABİLİR GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL


GrText(main_window, main_gc, 150, 20, message1, -1, GR_TFASCII);
int ktm;

adim=30;

for (k=0;k<Topla;k++)
{ adim=adim+15;

GrText(main_window, main_gc, 10, adim, message2[k], -1, GR_TFASCII);

}
GrRect(main_window, main_gc, 5, 5, WIDTH - 10, HEIGHT - 10);
}

/* Repaint the entire window */
static void repaintAll(void)
{
repaint(0,0,WIDTH,HEIGHT,Toplam);
}



/*
* Bu plugini yazan
* DreamVDR
* Geliştirilmeye açık koddur.
*/


int DosyaOku()
{
FILE *fp1,*fp2,*fp3;
char birkelime;
char *c;
int a,t,f,b;



a=0;f=0;
fp1 = fopen("/tmp/cccam.info","r");


do {
// birkelime ='bos';
birkelime = fgetc(fp1);
if (birkelime != NULL);
if (birkelime =='\n' )
{birkelime='\n';
server[a][f-1]= '\0';//birkelime;
// server[a][f+1]= '\0';
anahtar1[a][0]=server[a][f-9];
anahtar1[a][1]=server[a][f-8];
anahtar1[a][2]=server[a][f-7];
anahtar1[a][3]=server[a][f-6];
anahtar1[a][4]=server[a][f-5];
anahtar1[a][5]=server[a][f-4];
anahtar1[a][6]=server[a][f-3];
anahtar1[a][7]=server[a][f-2];
anahtar1[a][8]='\0';
// printf("%s",server[a]);
f=0;
a=a+1;
}
else
{server[a][f]= birkelime;

f=f+1;
}

} while (birkelime != '\377' ); /* Dosya sonu */
fclose(fp1);
f=0;
b=0;
sprintf( message1, "--- CCcam Info By KKav ---Beta V1.0 ---> Online CARD=%d",a);

fp3 = fopen("CCcam.providers","r");
do {
// birkelime ='bos';
birkelime = fgetc(fp3);
if (birkelime != NULL);
if(birkelime =='\n' )
{birkelime='\n';
mevcut[b][f]= '\0';

anahtar2[b][0]=mevcut[b][0];
anahtar2[b][1]=mevcut[b][1];
anahtar2[b][2]=mevcut[b][2];
anahtar2[b][3]=mevcut[b][3];
anahtar2[b][4]=mevcut[b][4];
anahtar2[b][5]=mevcut[b][5];
anahtar2[b][6]=mevcut[b][6];
anahtar2[b][7]=mevcut[b][7];
anahtar2[b][8]='\0';


// printf("%s",mevcut[b]);
f=0;
b=b+1;
}
else
{mevcut[b][f]= birkelime;

f=f+1;
}

} while (birkelime != '\377' ); /* Dosya sonu */
fclose(fp3);


a=a-1;
t=0;
Bul (a,b);

}


int Bul(int a1,int b1)
{
bulunans=0;
int x,y;
char *de1,*de2;
for (y=0;y<=a1;++y)
{
for (x=0;x<=b1;++x)
{
// strncpy(de1, anahtar1[y],7);
// strncpy(de2, anahtar1[x], 7);

de1=anahtar1[y];
de2=anahtar2[x];

if (strcmp(de1,de2)==0) //iki sitring(po,nter karşılaştır)
{
bulunana1[bulunans]=y;
bulunanb1[bulunans]=x;
bulunans=bulunans+1;
// printf("%d---%d--%d \n",x,y,bulunans);
break;
}//if

} //for x
} //for y

}

int Goster(int aralik2)
{int v,aralik,fg;
char *Stoplam;
char *diz1;
char *diz2;
fg=20;
Toplam=0;
v=0;
if (aralik2<0)
aralik2=0;

aralik=aralik2+fg;

if (aralik>bulunans)
{
aralik=bulunans;
}
for(v=aralik2;v<aralik;++v)
{

int ab,ba;
ba= bulunanb1[v];
ab= bulunana1[v];

diz1=server[ab];
diz2=mevcut[ba];
sprintf( message2[Toplam],"%s --> %s ",diz1,diz2);
printf("%s \n",message2[Toplam]);
Toplam=Toplam+1;


}

}



int
main(int argc,char **argv)
{
GR_EVENT event;
GR_WM_PROPERTIES props;
int grabResult;
int key = 'a';
int grabKind = GR_GRAB_HOTKEY_EXCLUSIVE;


DosyaOku();


//Ekranla bağlantı kur
if (GrOpen() < 0) {
printf("Can't open graphics\n");
exit(1);
}

/* pass errors through main loop*/

GrSetErrorHandler(NULL);

main_window = GrNewWindow(GR_ROOT_WINDOW_ID, 20, 20, WIDTH, HEIGHT,
0, GREEN, RED);

props.flags = GR_WM_FLAGS_PROPS | GR_WM_FLAGS_TITLE;
props.props = GR_WM_PROPS_NOBACKGROUND;
props.title = "Nano-X GrabKey Demo";
GrSetWMProperties(main_window, &props);

main_gc = GrNewGC();


grabResult = GrGrabKey(main_window, key, grabKind);
//printf("%d\n", grabResult);

GrSelectEvents(main_window, GR_EVENT_MASK_EXPOSURE | GR_EVENT_MASK_CLOSE_REQ
| GR_EVENT_MASK_KEY_DOWN | GR_EVENT_MASK_KEY_UP);
GrMapWindow(main_window);
GrSetFocus(main_window);

//Basılan Tuşları bul
kartim=0;
for (;;) {
GrGetNextEvent(&event);
switch (event.type)
{
case GR_EVENT_TYPE_EXPOSURE:
repaint(event.exposure.x, event.exposure.y,
event.exposure.width, event.exposure.height,Toplam);
break;
case GR_EVENT_TYPE_CLOSE_REQ:
GrClose();
exit(0);
break;
case GR_EVENT_TYPE_ERROR:
printf("\7grabdemo: Error (%s) ", event.error.name);
printf(nxErrorStrings[event.error.code],event.error.id);
break;
case GR_EVENT_TYPE_KEY_DOWN:
{
int i;
for(i=0;i<MAX_KEY;i++)
{
if(keys_td210[i].mwkey == event.keystroke.ch)
{

/* sprintf(message1, "%d uuu %03d Keyrrrr %d (%s) scan %d pressed \n",kartim,
getSerialNumber(), event.keystroke.ch,
keys_td210[i].name, event.keystroke.scancode);*/
if (keys_td210[i].name=="MWKEY_UP")
{//key up

kartim=kartim-1;

}

if (keys_td210[i].name=="MWKEY_DOWN")
{//keydown
kartim=kartim+1;

}

if (keys_td210[i].name=="MWKEY_LEFT")
{//key sol
kartim=kartim-10;

}

if (keys_td210[i].name=="MWKEY_RIGHT")
{//key sağ
kartim=kartim+10;

}


break;
}

}
}
if (kartim<0)
{ kartim=0;}

Goster(kartim);
repaintAll();
break;

}


}

//basılan tuşları bul son

GrClose();
return 0;
}


////

Makefile

.SUFFIXES:.c.o

CC = mipsel-linux-gcc

INC = /DATA/Yellow/Working/ExternTarget/include/microwin

LIBS = -L../lib -lnano-X

CFLAGS = -I$(INC)

OBJS = CCcaminfo.o

SRCS = CCcaminfo.c

TARGET = CCcaminfo.bin

all : $(TARGET)

$(TARGET) : $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBS)

clean :
rm -rf $(OBJS) CCcaminfo/CCcaminfo CCcaminfo.plugin plugins.lst

install : $(TARGET)
mv CCcaminfo.bin CCcaminfo
mv CCcaminfo/CCcaminfo.bin CCcaminfo/CCcaminfo
tar -cvzf CCcaminfo.plugin CCcaminfo CCcam.providers
echo CCcaminfo > plugins.lst