Cisco Systems WVC80N manual CGI Commands, Appendix D, o_bufj++ = charchr1 if enc3 !=

Models: WVC80N

1 66
Download 66 pages 1.74 Kb
Page 44
Image 44
o_buf[j++] = (char)chr1;

Appendix D

CGI Commands

//Heres the decode part. There’s really only one way to do it. chr1 = (enc1 << 2) (enc2 >> 4);

chr2 = ((enc2 & 15) << 4) (enc3 >> 2); chr3 = ((enc3 & 3) << 6) enc4;

o_buf[j++] = (char)chr1;

if (enc3 != 64) {

o_buf[j++] = (char)chr2;

}

if (enc4 != 64) {

o_buf[j++] = (char)chr3;

}

//now clean out the variables used chr1 = (char)0;

chr2 = (char)0; chr3 = (char)0;

enc1 = 0; enc2 = 0; enc3 = 0; enc4 = 0;

} while (i < strlen(i_buf)); //finish off the loop

//Now return the decoded values. return j;

}

Wireless-N Internet Home Monitoring Camera

43

Page 44
Image 44
Cisco Systems WVC80N manual CGI Commands, Appendix D, o_bufj++ = charchr1 if enc3 !=