Remove use off system's local /usr/include/PCSC in case off cross compile

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8349 4b0bc96b-bc66-0410-9d44-ebda105a78c1
This commit contains a deeply reworked version of gbox connectivity module, originally written by user leloup.
His patch was added @r6159 and rejected almost immediately because of many issues. This reworked version was developed to fix these issues.

In its current state the code works with gbox and gbox.net, and does not work with mbox (but it seems user pointer2 knows how to add mbox compatibility).

The following threads contain info about rework process and decisions made during the development:

http://www.streamboard.tv/wbb2/thread.php?postid=437281
http://www.streamboard.tv/wbb2/thread.php?postid=451886
http://www.streamboard.tv/wbb2/thread.php?postid=437103

The biggest THANK YOU goes to leloup, original author of the gbox patch.
Many thank to people who helped me during development: felixka, pointer2, Gorgone, gfto, felix2, veskop, Bit, Admin, today, Bruty, sypo, draus, breitscheitel, thatave, Eggy123, scader, dkey, Misterfx and others.

The WebIF support and some other small features were stripped from the original patch. 
Also names of configuration parameters were changed - the new config documentation follows:


<code>
================================================================================================================
Parameter   Default Requ- Value for example         Description
name        value   ired? 
================================================================================================================

===========================
oscam.conf, [gbox] section:
===========================

gbox_hostname        Yes  192.168.1.123             My IP or host name (accessible by peers)

gbox_local_cards     No   17020000,01003311         Comma-separated list of local card(s) reported to peers
                                                    Note: max list size is 16 cards

gbox_reconnect  300  No   3600                      Send "Hello" message to peers every <gbox_reconnect> seconds


===================================================
oscam.server, [reader] section with protocol = gbox
===================================================

device               Yes   192.168.1.101,3820,3819  Comma-separated list of 3 values: 
                                                    peer's IP or host name,peer's port,my port

password             Yes   A123BCDE                 Password I use to connect to peer   (4 hex bytes, 8 chars)
gbox_my_password     Yes   98AF3E25                 Password peer uses to connect to me (4 hex bytes, 8 chars)

gbox_reshare      0  No    1                        Reshare level of local card(s)
gbox_max_distance 2  No    2                        Max distance to receive peer cards
gbox_max_ecm_send 3  No    3                        Send ecm to max <gbox_max_ecm_send> peer cards
gbox_group           No                             gbox own list of groups, same syntax as "group" parameter

==============================================================================================================
</code>


Minimal working configuration example
=====================================
Let's say gbox server runs on host 192.168.1.101 and OSCam is on 192.168.1.123.
In file cwshare.cfg on gbox side we have, for example, the following lines:

M: { 192.168.1.101 { A123BCDE }}
D: { 192.168.1.123 { 3820 3819 { 98AF3E25 { A3 A3 }}}}

Then we may configure OSCam as follows:

oscam.conf:
===========

[gbox]
gbox_hostname = 192.168.1.123

oscam.server:
=============

[reader]
protocol = gbox
group    = 1
device   = 192.168.1.101,3820,3819
password = A123BCDE
gbox_my_password = 98AF3E25


Migration guide for old users of leloup's patch:
================================================

Just rename parameters as follows.

<code>
====================================
In oscam.conf, [gbox] section:

gbox_hostname     <-  hostname
gbox_local_cards  <-  localcard
gbox_reconnect    <-  servgreconnect

In oscam.server, [reader] section:

gbox_my_password  <-  my_password
gbox_reshare      <-  greshare
gbox_max_distance <-  maxdist
gbox_max_ecm_send <-  maxecmsend
gbox_group        <-  groupclg
====================================
</code>



git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8350 4b0bc96b-bc66-0410-9d44-ebda105a78c1
gbox: Fix compilation when CCCAM is disabled.

cc_currenthops is now used in both CCCAM and GBOX, rename the
variable to currenthops.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8351 4b0bc96b-bc66-0410-9d44-ebda105a78c1
gbox: Fix compilation when CCCAM is disabled.

gbox initializes its server address using different variables than
cfg.cc_srvip (which is not used at all, by the way).

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8352 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix harmess warnings in STAPI & !WITH_CARDREADER build.

The warnings were:
  oscam-reader.c: In function 'ATR_InitFromArray':
  oscam-reader.c:601: warning: unused parameter 'atr'
  oscam-reader.c:601: warning: unused parameter 'atr_buffer'
  oscam-reader.c:601: warning: unused parameter 'length'

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8353 4b0bc96b-bc66-0410-9d44-ebda105a78c1
build: Do no show strip command in build info banner.

99.996% of the time this info is useless, stop cluttering info
banner with it.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8354 4b0bc96b-bc66-0410-9d44-ebda105a78c1
build: Do not check WITH_PCSC in the code, the correct symbol is CARDREADER_PCSC.

WITH_PCSC is "external" symbol and should be checked only in config.h

Every other place should use CARDREADER_PCSC.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8355 4b0bc96b-bc66-0410-9d44-ebda105a78c1
build: Do not check WITH_LIBUSB in the code, the correct symbol is CARDREADER_SMART.

WITH_LIBUSB is "external" symbol and should be checked only in config.h

Every other place should use CARDREADER_SMART.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8356 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Removed the hard targetting off PCSC header location.
I left the the optional_include dir option but it's not needed anymore.
for crosscompile do not forget to ad 
SET(CMAKE_FIND_ROOT_PATH <target systems root pat> )
To you're toolchain.cmake file used
This patche solves the poisoning use off local PCSC headers instead of those for the target system in case of crosscompile.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8357 4b0bc96b-bc66-0410-9d44-ebda105a78c1
freebsd