Symbian Security Studio

About symbian software programming ,security analysis and other things about symbian.

Tuesday, November 20, 2007

Google Steps Up Spectrum Serenade


Google Steps Up Spectrum Serenade



Just as Apple shook up the phone industry with its advanced iPhone, Google hopes to do the same with the networks that manage mobile devices.

Earlier this year, Google made clear its intent, under the right conditions, to make a $4.65 billion bid for the 700 MHz wireless spectrum the Federal Communications Commission is putting up for auction in January.

Those plans are becoming more definite, with Google already running a test version of an advanced wireless network at its Mountain View, Calif. headquarters, according to a report in the Wall Street Journal today.

Last month, CEO Eric Schmidt told analysts his company is open to working with partners on the FCC bid, but according to the Journal, Google is now working out a plan to finance the bid using its own cash and possibly some borrowed funds.

Google declined a request to comment on its specific plans, but sent the following comment to InternetNews.com:

"Our goal is to make sure that American consumers have more choices in an open and competitive wireless world. We have already made great progress in achieving this outcome and expect more progress in the future. FCC rules require us to reveal our plans by December 3, and we fully intend to do so. In the meantime, we are making all the necessary preparations to become an applicant to bid in the auction."

Google had earlier notified the government of four conditions related to open access for the spectrum that would influence its decision to make the minimum-asking bid of $4.65 billion.

At the analysts' briefing, co-founder and president Sergey Brin said if Google wins the bid it will offer developers and users a network that will be "very open." He said the government has already adopted two of the four openness pre-conditions Google requested. In the current system, wireless developers generally have to get a carrier's permission to let their applications run on the network.

The latest developments come on the heels of Google's big announcement earlier this month detailing its mobile phone plans, specifically, a set of open source software tools for bringing new applications to mobile devices. While a separate initiative, both the spectrum bid and the Google-led Open Handset Alliance (OHA) driving its mobile software plans are part of the company's desire to open up mobile communications to more development and wider access.

"The auction is a tactic to get the outcome of end-user choice," Schmidt said. Google is already operating an advanced high-speed wireless network under a test license from the FCC, according to the Journal's story, which cited unnamed sources familiar with the project. The article said Google has erected transmission towers on its campus for the network and prototype mobile handsets powered by Google's Android software that are currently running on it.

Google has quickly become a major player in the mobile and wireless industry, even though its first products aren't expected to be available until later next year, said Gerry Purdy, Frost & Sullivan's chief analyst for mobile and wireless.

"This raises the bar for the industry again, just as Apple did with the iPhone earlier this year," said Purdy, in an e-mail commentary sent to InternetNews.com. "This is very similar to the Microsoft model, except with one big difference: Microsoft gets its revenue from licensing its platforms to handset makers, whereas Google will get its revenue from advertising done by advertisers presented to users of Android-based devices. Thus, Google will give away Android but make recurring revenue from an open ecosystem in which advertising drives revenues."

Friday, November 16, 2007

Every Nokia Phone Ever Made (Time Line) - Nokia

Every Nokia Phone Ever Made (Time Line)
The following is a time line of phones that Nokia has released since 1982 up until the present.

1982: Model Screen Network Generation Form Factor
Mobira Senator Monochrome NMT 450 Unknown Boxtype - The first mobile phone

1986: Model Screen Network Generation Form Factor
Mobira Talkman 450 Monochrome NMT 450 Unknown Boxtype

1987: Model Screen Network Generation Form Factor
Mobira Cityman 100 Monochrome ETACS Unknown Brick Mobira Cityman 900

1992: Model Screen Network Generation Form Factor
Nokia 1000 Monochrome AMPS DCT1 Candybar Nokia 101

1994: Model Screen Network Generation Form Factor
Nokia 2010 Monochrome GSM DCT1 Candybar

1995: Model Screen Network Generation Form Factor
Nokia 2110 Monochrome GSM DCT1 Candybar
Nokia 636 Monochrome AMPS Unknown Candybar
Nokia Ringo Monochrome TACS/ETACS/NMT DCT1 Candybar
Nokia Ringo Monochrome TACS/ETACS/NMT DCT1 Candybar

1996: Model Screen Network Generation Form Factor
Nokia 1610 Monochrome GSM DCT1 Candybar
Nokia 1910 Monochrome GSM DCT1 Candybar
Nokia 2110i Monochrome GSM DCT1 Candybar
Nokia 2160 Monochrome TDMA/AMPS DCT1 Candybar
Nokia 638 Monochrome AMPS Unknown Candybar
Nokia 8110 Monochrome GSM DCT2 Candybar (slide cover)
Nokia 8148 Monochrome GSM DCT2 Candybar (slide cover)
Nokia 9000 Communicator 640 x 200 Monochrome GSM DCT1 Clamshell

1997: Model Screen Network Generation Form Factor
Nokia 1611 Monochrome GSM DCT1 Candybar
Nokia 1620 Monochrome GSM DCT1 Candybar
Nokia 1911 Monochrome GSM DCT1 Candybar
Nokia 2160i Monochrome TDMA/AMPS DCT1 Candybar
Nokia 2168 Monochrome TDMA/AMPS DCT1 Candybar
Nokia 2180 Monochrome CDMA/AMPS DCT1 Candybar
Nokia 2190 Monochrome GSM DCT1 Candybar
Nokia 3110 Monochrome GSM DCT2 Candybar
Nokia 3110 Monochrome GSM DCT2 Candybar
Nokia 3810 Monochrome GSM DCT3 Candybar
Nokia 3810 Monochrome GSM DCT3 Candybar
Nokia 6110 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6130 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6138 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6190 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 9000i Communicator 640 x 200 Monochrome GSM DCT1 Clamshell

1998: Model Screen Network Generation Form Factor
Nokia 1630 Monochrome GSM DCT1 Candybar
Nokia 1631 Monochrome GSM DCT1 Candybar
Nokia 2170 Monochrome CDMA DCT1 Candybar
Nokia 282 Monochrome AMPS/NAMPS Unknown Clamshell
Nokia 6120 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 6150 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6160 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 8810 Monochrome GSM DCT3 Soft-slide Chrome cover
Nokia 9110 Communicator 640 x 200 Monochrome GSM DCT3 Clamshell

1999: Model Screen Network Generation Form Factor
Nokia 3210 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 3210 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6090 (car phone) 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6185 Monochrome CDMA/AMPS DCT3 Candybar
Nokia 640 Monochrome NMT Unknown Candybar
Nokia 650 Monochrome NMT Unknown Candybar
Nokia 7110 96 x 65 Monochrome GSM DCT3 Candybar (slide cover)
Nokia 8210 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 8850 84 x 48 Monochrome GSM DCT3 Candybar (slide cover)
Nokia 8860 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar (slide cover)

2000: Model Screen Network Generation Form Factor
Nokia 3310 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 3310 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 3390 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 3390 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6210 96 x 65 Monochrome GSM DCT3 Candybar
Nokia 6250 96 x 65 Monochrome GSM DCT3 Candybar
Nokia 7160 96 x 65 Monochrome TDMA/AMPS DCT3 Candybar (slide cover)
Nokia 7190 96 x 65 Monochrome GSM DCT3 Candybar (slide cover)
Nokia 8260 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 8890 84 x 48 Monochrome GSM DCT3 Candybar (slide cover)
Nokia 9110i Communicator 640 x 200 Monochrome GSM DCT3 Clamshell

2001: Model Screen Network Generation Form Factor
Nokia 3280 84 x 48 Monochrome CDMA/AMPS DCT3 Candybar
Nokia 3285 84 x 48 Monochrome CDMA/AMPS DCT3 Candybar
Nokia 3320 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 3330 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 3350 96 x 65 Monochrome GSM DCT3 Candybar
Nokia 3360 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 3395 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 6310 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 6360 96 x 65 Monochrome TDMA DCT4 Candybar
Nokia 8250 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 8290 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 8310 84 x 48 Monochrome GSM DCT4 Candybar
Nokia 8855 84 x 48 Monochrome GSM DCT3 Candybar (slide cover)
Nokia 9210 Communicator 640 x 200 12-bit (4096) Color GSM DCTL Clamshell

2002: Model Screen Network Generation Form Factor
Nokia 1220 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 1221 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 1260 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 1261 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 3315 84 x 48 Monochrome GSM DCT3 Candybar
Nokia 3410 96 x 65 Monochrome GSM DCT3 Candybar
Nokia 3510 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 3510i 96 x 65 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3585 96 x 65 Monochrome CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3590 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 3610 96 x 65 Monochrome GSM DCT3 Candybar
Nokia 6100 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 6310i 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 6340i 96 x 65 Monochrome GAIT DCT4 Candybar
Nokia 6370 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 6385 96 x 65 Monochrome CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6500 96 x 65 Monochrome GSM DCT4 Candybar (slide cover)
Nokia 6510 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 6590 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 6610 128 x 128 12-bit (4,096) Color GSM DCT4 Candybar
Nokia 7210 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 7650 176 x 208 12-bit (4096) Color GSM DCT4 Slide
Nokia 8265 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 8265i 84 x 48 Monochrome TDMA/AMPS DCT3 Candybar
Nokia 8270 84 x 48 Monochrome CDMA DCT3 Candybar
Nokia 8280 84 x 48 Monochrome CDMA2000 1x DCT3 Candybar
Nokia 8390 84 x 48 Monochrome GSM DCT4 Candybar
Nokia 8910 84 x 48 Monochrome GSM DCT4 Auto-slide Titanium cover
Nokia 9210i Communicator 640 x 200 12-bit (4096) Color GSM DCTL Clamshell
Nokia 9290 Communicator 640 x 200 12-bit (4096) Color GSM DCTL Clamshell
Signature 116 x 148 12-bit (4096) Color GSM Unknown Candybar


2003: Model Screen Network Generation Form Factor
N-Gage 176 x 208 12-bit (4096) Color GSM DCT4 Candybar
Nokia 1100 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 2100 96 x 65 Monochrome GSM DCT3 Candybar
Nokia 2220 84 x 48 Monochrome TDMA/AMPS DCT4 Candybar
Nokia 2260 84 x 48 Monochrome TDMA/AMPS DCT4 Candybar
Nokia 2270 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2280 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2285 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 3100 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3105 128 x 128 12-bit (4096) Color CDMA2000 1x DCT4 Candybar
Nokia 3108 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3200 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3300 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3520 96 x 65 12-bit (4096) Color TDMA/AMPS DCT4 Candybar
Nokia 3530 96 x 65 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3560 96 x 65 12-bit (4096) Color TDMA/AMPS DCT4 Candybar
Nokia 3570 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 3585i 96 x 65 Monochrome CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3586i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3587i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3588i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3589i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3595 96 x 65 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3600 176 x 208 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3620 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 3650 176 x 208 12-bit (4096) Color GSM DCT4 Candybar/ Circular keypad
Nokia 3660 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6108 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 6200 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 6220 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 6340 96 x 65 Monochrome GAIT DCT4 Candybar
Nokia 6560 128 x 128 12-bit (4096) Color TDMA/AMPS DCT4 Candybar
Nokia 6585 128 x 128 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6590i 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 6600 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6650 128 x 160 12-bit (4096) Color UMTS/GSM DCT4 Candybar
Nokia 6800 128 x 128 12-bit (4096) Color GSM DCT4 Candybar (flip keyboard)
Nokia 7250 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 7250i 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 7600 128 x 160 16-bit (65,536) Color UMTS/GSM DCT4 Candybar
Nokia 810 (car phone) Monochrome GSM Unknown Candybar
Nokia 8910i 96 x 65 12-bit (4096) Color GSM DCT4 Auto-slide Titanium cover



2004:
Model Screen Network Generation Form Factor Camera
Ascent 116 x 148 12-bit (4096) Color GSM Unknown Candybar
Constellation- 116 x 148 12-bit (4096) Color GSM Unknown Candybar
N-Gage QD 176 x 208 12-bit (4096) Color GSM DCT4 Candybar
Nokia 2112 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2300 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 2600 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 2650 128 x 128 12-bit (4096) Color GSM DCT4 Clamshell
Nokia 2651 128 x 128 12-bit (4096) Color GSM DCT4 Clamshell
Nokia 3120 128 x 128 12-bit (4096) Color GSM DCT4 Candybar
Nokia 3125 128 x 128 12-bit (4096) Color CDMA2000 1x DCT4 Candybar
Nokia 3128 128 x 160 18 bit (65,536) Color 96 x 64 16 bit (4,096) Color (external) GSM DCT4 Clamshell - China market only
Nokia 3205 128 x 128 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 3220 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6010 96 x 65 12-bit (4096) Color GSM DCT4 Candybar
Nokia 6011i 96 x 65 12-bit (4096) Color CDMA2000 1x DCT4 Candybar
Nokia 6012 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6015 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6015i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6016i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6019i 96 x 65 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 6170 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell
Nokia 6225 128 x 128 12-bit (4096) Color CDMA2000 1x/AMPS DCT4 Candybar VGA
Nokia 6230 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar VGA
Nokia 6255i 128 x 160 16-bit (65,536) Color CDMA2000 1x/AMPS DCT4 Clamshell VGA
Nokia 6256i 128 x 160 16-bit (65,536) Color CDMA2000 1x/AMPS DCT4 Clamshell VGA
Nokia 6260 176 x 208 16-bit (65,536) Color GSM DCT4 Clamshell
Nokia 6610i 128 x 128 12-bit (4,096) Color GSM DCT4 Candybar CIF
Nokia 6620 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6630 176 x 208 16-bit (65,536) Color UMTS/GSM BB5.0 Candybar 1.3 Megapixel
Nokia 6638 176 x 208 16-bit (65,536) Color CDMA2000 1x BB5.0 Candybar
Nokia 6651 128 x 160 12-bit (4096) Color UMTS/GSM DCT4 Candybar
Nokia 6670 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6810 128 x 128 12-bit (4096) Color GSM DCT4 Candybar (flip keyboard)
Nokia 6820 128 x 128 12-bit (4096) Color GSM DCT4 Candybar (flip keyboard)
Nokia 7200 128 x 128 16-bit (65,536) Color GSM DCT4 Clamshell
Nokia 7260 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 7270 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell
Nokia 7280 104 x 208 16-bit (65,536) Color GSM DCT4 Lipstick / Slide
Nokia 7610 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 9500 Communicator 640 x 200 16-bit (65,536) Color GSM DCT4 (APE) Clamshell

2005:
Model Screen Network Generation Form Factor Camera
Nokia 1101 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 1108 96 x 65 Monochrome GSM DCT4 Candybar
Nokia 1110 96 x 68 Inverse Monochrome GSM DCT4 Candybar
Nokia 2115 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2115i 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2116i 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2118 96 x 65 Monochrome CDMA2000 1x DCT4 Candybar
Nokia 2125i 96 x 65 16-bit (65,536) Color CDMA2000 1x/AMPS DCT4 Candybar
Nokia 2126i 96 x 65 16-bit (65,536) Color CDMA2000 1x DCT4 Candybar
Nokia 2128i 96 x 65 16-bit (65,536) Color CDMA2000 1x DCT4 Candybar
Nokia 2255 128 x 128 (65,536) Color CDMA2000 1x DCT4 Clamshell
Nokia 2652 128 x 128 12-bit (4096) Color GSM DCT4 Clamshell
Nokia 3152 128 x 160 18-bit (262,144) Color 96 x 65 Monochrome (external) CDMA2000 1x DCT4 Clamshell
Nokia 3155 128 x 160 18-bit (262,144) Color 96 x 65 Monochrome (external) CDMA2000 1x DCT4 Clamshell
Nokia 3230 176 x 208 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 3250 176 x 208 18-bit (262,144) Color GSM BB5.0 Candybar/ Twist
Nokia 6020 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar VGA
Nokia 6021 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6030 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6060 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell
Nokia 6101 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell VGA
Nokia 6102 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell VGA
Nokia 6111 128 x 160 18-bit (262,144) Color GSM DCT4 Slide
Nokia 6155 128 x 160 18-bit (262,144) Color 96 x 65 16-bit (65,536) Color (external) CDMA2000 1x/AMPS DCT4 Clamshell
Nokia 6155i 128 x 160 18-bit (262,144) Color 96 x 65 16-bit (65,536) Color (external) CDMA2000 1x/AMPS DCT4 Clamshell
Nokia 6230i 208 x 208 16-bit (65,536) Color GSM DCT4 Candybar 1.3 Megapixel
Nokia 6235 128 x 128 16-bit (65,536) Color CDMA2000 1x DCT4 Candybar VGA
Nokia 6235i 128 x 128 16-bit (65,536) Color CDMA2000 1x/AMPS DCT4 Candybar VGA
Nokia 6265 320 x 240 18-bit (262,144) Color CDMA2000 1x DCT4 Slide 2.0 Megapixels
Nokia 6270 320 x 240 18-bit (262,144) Color GSM BB5.0 Slide 2.0 Megapixels
Nokia 6280 320 x 240 18-bit (262,144) Color UMTS/GSM BB5.0 Slide 2.0 Megapixels
Nokia 6680 176 x 208 18-bit (262,144) Color UMTS/GSM BB5.0 Candybar 1.3 Megapixel
Nokia 6681 176 x 208 18-bit (262,144) Color GSM BB5.0 Candybar
Nokia 6682 176 x 208 18-bit (262,144) Color GSM BB5.0 Candybar
Nokia 6822 128 x 128 16-bit (65,536) Color GSM DCT4 Candybar (flip keyboard)
Nokia 7710 640 x 320 16-bit (65,536) Color GSM DCT4 (APE) Candybar
Nokia 8800 208 x 208 18-bit (262,144) Color GSM DCT4 Soft-slide Stainless Steel cover
Nokia 8801 208 x 208 18-bit (262,144) Color GSM DCT4 Soft-slide Stainless Steel cover
Nokia 9300 640 x 200 16-bit (65,536) Color GSM DCT4 (APE) Clamshell
Nokia N70 176 x 208 18-bit (262,144) Color GSM/UMTS BB5.0 Candybar 2.0 Megapixels
Nokia N90 352 x 416 18-bit (262,144) Color GSM/UMTS BB5.0 Clamshell 2.0 Megapixels
Nokia N91 176 x 208 18-bit (262,144) Color GSM/UMTS BB5.0 Slide 2.0 Megapixels

2006:
Model Screen Network Generation Form Factor Camera
Nokia 1110i 96 x 68 Inverse Monochrome GSM DCT4 Candybar
Nokia 1112 96 x 68 Monochrome GSM DCT4 Candybar
Nokia 1600 96 x 68 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 2310 96 x 68 16-bit (65536) color GSM DCT4+ Candybar
Nokia 2366i 128 x 160 16-bit (65536) color CDMA2000 1x DCT4 Clamshell
Nokia 2610 128 x 128 16-bit (65536) color GSM DCT4+ Candybar
Nokia 6070 128 x 160 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 6102i 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell VGA
Nokia 6103 128 x 160 16-bit (65,536) Color GSM DCT4 Clamshell VGA
Nokia 6125 128 x 160 18-bit (262,144) Color GSM BB5.0 Clamshell
Nokia 6126 320 x 240 24-bit (16,777,216) Color GSM BB5.0 Clamshell 1.3 Megapixels
Nokia 6131 320 x 240 24-bit (16,777,216) Color GSM BB5.0 Clamshell 1.3 Megapixels
Nokia 6133 320 x 240 24-bit (16,777,216) Color GSM BB5.0 Clamshell 1.3 Megapixels
Nokia 6136 128 x 160 18-bit (262,144) Color GSM/UMA (VoIP) BB5.0 Clamshell
Nokia 6151 128 x 160 (262,144) Color GSM/WCDMA BB5.0 Candybar 1.3 Megapixels
Nokia 6215i 128 x 128 18-bit (262,144) Color OLED CDMA DCT4 Candybar
Nokia 6233 320 x 240 18-bit (262,144) Color UMTS/GSM BB5.0 Candybar 2.0 Megapixels
Nokia 6234 320 x 240 18-bit (262,144) Color UMTS/GSM BB5.0 Candybar 2.0 Megapixels
Nokia 6275 320 x 240 18-bit (262,144) Color CDMA2000 1x BB5.0 Candybar 2.0 Megapixels
Nokia 6288 320 x 240 18-bit (262,144) Color UMTS/GSM BB5.0 Slide 2.0 Megapixels
Nokia 6290 240 x 320 24-bit (16,777,216) Color 128 x 160 16-bit (262,144) Color (external) UMTS/GSM BB5.0 Clamshell 2.0 Megapixels
Nokia 6300 240 x 320 24 bit (16,777,216) Color GSM BB5.0 Candybar 2.0 Megapixels
Nokia 6315i 128 x 160 18-bit (262,144) Color CDMA DCT4 Clamshell
Nokia 7360 128 x 160 16-bit (65,536) Color GSM DCT4 Candybar
Nokia 7370 240 x 320 18-bit (262,144) Color GSM BB5.0 Swivel
Nokia 7373 240 x 320 18-bit (262,144) Color GSM/UMTS BB5.0 Swivel
Nokia 7380 104 x 208 16-bit (65,536) Color GSM DCT4 Lipstick
Nokia 7390 240 x 320 24-bit (16,7M) Color GSM/UMTS BB5.0 Clamshell
Nokia 9300i 640 x 200 16-bit (65,536) Color GSM DCT4 (APE) Clamshell
Nokia E50 240 x 320 18-bit (262,144) Color GSM/EDGE BB5.0 Candybar
Nokia E60 352 x 416 24-bit (16.7 million) Color GSM/UMTS BB5.0 Candybar
Nokia E61 320 x 240 24-bit (16.7 million) Color GSM/UMTS BB5.0 Candybar
Nokia E62 320 x 240 24-bit (16.7 million) Color GSM/EDGE BB5.0 Candybar
Nokia E70 352 x 416 24-bit (16.7 million) Color GSM (Americas) or GSM/UMTS (Europe/Asia) BB5.0 Candybar (flip keyboard)
Nokia N71 320 x 240 18-bit (262,144) Color GSM/UMTS BB5.0 Clamshell 2.0 Megapixels
Nokia N72 176 x 208 18-bit (262,144) Color GSM BB5.0 Candybar 2.0 Megapixels
Nokia N73 320 x 240 18-bit (262,144) Color GSM/UMTS BB5.0 Candybar 3.2 Megapixels
Nokia N75 320 x 240 24-bit (16.7M) Color GSM/UMTS BB5.0 Clamshell 2.0 Megapixels
Nokia N80 352 x 416 18-bit (262,144) Color GSM/UMTS BB5.0 Slide 3.15 Megapixels
Nokia N93 320 x 240 18-bit (262,144) Color GSM/UMTS BB5.0 Clamshell 3.2 Megapixels

2007:
Model Screen Network Generation Form Factor Camera
Nokia 2630 128 x 160 16-bit (65536) color GSM DCT4+ Candybar
Nokia 3110 classic 128 x 160 18-bit (262,144) GSM/EDGE BB5.0 Candybar
Nokia 3110 classic 128 x 160 18-bit (262,144) GSM/EDGE BB5.0 Candybar
Nokia 6085 128 x 160 18-bit (262,144) Color GSM DCT4 Clamshell VGA
Nokia 6086 128 x 160 18-bit (262,144) Color GSM/UMA (VoIP) DCT4 Clamshell VGA
Nokia 6110 Navigator 240 x 320 24-bit (16,777,216) Color HSDPA/GSM/EDGE BB5.0 Slide 2.0 Megapixels
Nokia 6120 Classic 240 x 320 24-bit (16,777,216) Color HSDPA/GSM/EDGE BB5.0 Candybar 2.0 Megapixels
Nokia 6121 Classic 240 x 320 24-bit (16,777,216) Color HSDPA/GSM/EDGE BB5.0 Candybar 2.0 Megapixels
Nokia 6267 320 x 240 24-bit (16,777,216) Color GSM BB5.0 Clamshell 2.0 Megapixels
Nokia 6500 classic 240 x 320 24-bit (16.7 million) Color GSM/UMTS BB5.0 Candybar 2.0 Megapixels
Nokia 6500 slide 240 x 320 24-bit (16.7 million) Color GSM/UMTS BB5.0 Slide 3.2 Megapixels
Nokia 6555 240 x 320 24-bit (16.7 million) Color GSM/UMTS BB5.0 Clamshell 1.3 Megapixels
Nokia 8600 320 x 240 24-bit (16.7M) Color GSM BB5.0 Slider
Nokia E61i 320 x 240 24-bit (16.7 million) Color GSM/EDGE/UMTS BB5.0 Candybar
Nokia E65 320 x 240 24-bit (16.7 million) Color GSM/EDGE/UMTS BB5.0 Slide
Nokia E90 Communicator 800 x 352 24-bit (16.7 million) Color GSM/EDGE/3G BB5.0 Clamshell
Nokia N76 320 x 240 24-bit (16.7M) Color GSM/UMTS BB5.0 Clamshell 2.0 Megapixels
Nokia N77 329 x 240 24-bit (16.7M) Color GSM/UMTS BB5.0 Candybar 2.0 Megapixels
Nokia N81 320 x 240 24-bit (16.7M) Color GSM/UMTS BB5.0 Slide 2.0 Megapixels
Nokia N92 320 x 240 24-bit (16.7M) Color GSM/UMTS BB5.0 Clamshell 2.0 Megapixels
Nokia N93i 320 x 240 24-bit (16.7M) Color GSM/UMTS BB5.0 Clamshell 3.2 Megapixels
Nokia N95 320 x 240 24-bit (16.7M) Color GSM/UMTS/HSDPA BB5.0 2-way Slide 5 Megapixels

Thursday, November 15, 2007

I came across Nokia Universal Codes - Nokia

Nokia Phone Codes:

01) *3370# Activate Enhanced Full Rate Codec (EFR) - Your phone uses the best sound
quality but talk time is reduced my approx. 5%

02) #3370# Deactivate Enhanced Full Rate Codec (EFR) OR *3370# ( Favourite )

03) *#4720# Activate Half Rate Codec - Your phone uses a lower quality sound but you
should gain approx 30% more Talk Time.

04) *#4720# Deactivate Half Rate Codec.

05) *#0000# Displays your phones software version, 1st Line : Software Version, 2nd
Line : Software Release Date, 3rd Line : Compression Type. ( Favourite )

06) *#9999# Phones software version if *#0000# does not work.

07) *#06# For checking the International Mobile Equipment Identity (IMEI Number). (
Favourite )

08) #pw+1234567890+1# Provider Lock Status. (use the "*" button to obtain the "p,w"
and "+" symbols).

09) #pw+1234567890+2# Network Lock Status. (use the "*" button to obtain the "p,w"
and "+" symbols).

Symbian Acquires Personnel and Technology from Beijing Genesis Interactive Technology as part of Global R&D Strategy

Symbian Acquires Personnel and Technology from Beijing Genesis Interactive Technology as part of Global R&D Strategy

Symbian Acquires Personnel and Technology from Beijing Genesis Interactive Technology as part of Global R&D Strategy
LONDON, United Kingdom and BEIJING, China – 14 November 2007 – Symbian Limited, today announced the acquisition of personnel and technology from Beijing Genesis Interactive Technology Co. Ltd. (‘MoGenesis’), a leading developer of smart OS mobile applications for the Chinese market. The acquisition is part of Symbian’s commitment and strategic growth in the Chinese market, significant to the continuous development of Symbian OS™, the market-leading open operating system for advanced data-enabled mobile phones known as smartphones.

Joining Symbian Software Beijing Co. Limited will be the engineers and management team of MoGenesis, including the CEO, Dennis Kung, who has been appointed as the new General Manager for Symbian in China, spearheading Symbian product development in the region. The team brings years of accomplished engineering experience within mobile platforms including Symbian OS and essential product creation capability that will help accelerate Symbian’s R&D operations in Beijing.

Symbian OS is licensed to the world’s leading handset manufacturers and to date, over 165 million Symbian smartphones have shipped worldwide to over 250 major network operators. During the third quarter of 2007, Symbian continued to lead the global smartphone market, with its licensees shipping 20.4 million Symbian smartphones worldwide resulting in a healthy growth of 56% since the third quarter of 2006.

Commenting on the acquisition, Nigel Clifford, Chief Executive, Symbian, said, ‘The acquisition will play a key role in Symbian’s global R&D strategy for our world-leading customers. China is one of the fastest growing markets for smartphones in the world and we will leverage our new Chinese resources to increase Symbian OS global product development. Symbian achieved 60% smartphone OS market share in China with 77% year on year growth, according to one analyst (Canalys) in Q207. We intend to continue growing our sales and our presence in this very vibrant market.’

Dennis Kung has an impressive track record within the high-tech industry. Before founding MoGenesis, he held two senior management positions at Microsoft Corporation where he worked for eleven years. In addition, Mr. Kung worked as a technical consultant for Andersen Consulting (known as Accenture) in the United States.

Dennis Kung, said, ‘My team and I are extremely excited to be part of Symbian’s long term vision in China. With its market leading position, Symbian is able to provide world-class career prospects for my engineers and for new recruits in Beijing. We welcome Symbian’s plans for strategic development and feel confident we can succeed in contributing our unique expertise to the company’s global success.’

Symbian opened its new sales and marketing office in Beijing in January 2007, later adding its new R&D centre in August 2007. Symbian Software Beijing is playing a vital role in Symbian’s strategy for sustained global leadership, whilst deepening its engagement with local customers and partners.

For job opportunities, please see: http://careers.symbian.com or visit Symbian’s Chinese website: http://www.symbian.com.cn

- ENDS -

Notes to Editors
About Symbian Limited
Symbian is a software licensing company that develops and licenses Symbian OS, the market-leading open operating system for advanced, data-enabled mobile phones known as smartphones.

Symbian licenses Symbian OS to the world's leading handset manufacturers and has built close co-operative business relationships with leading companies across the mobile industry. During Q3 2007, 20.4 million Symbian smartphones were sold worldwide to over 250 major network operators, bringing the total number of Symbian smartphones shipped up to 30 September 2007 to 165 million.

Symbian has its headquarters in London, United Kingdom, with offices in the United States, United Kingdom, Asia (India, P.R. China, and Korea) and Japan. For more information, please visit www.symbian.com

Media Enquiries
Global
Karen Hamblen
Symbian Ltd

+44 207 154 1000


press@symbian.com US
Valerie Breslow
V. Breslow Communications

+1 858 337 4217


valbreslow@earthlink.net
Europe
David Matthews
Catalysis

+44 20 7101 7340


symbian@catalysis.co.uk Japan
Seiko Konishi
Burson-Marsteller apan

+81 3 3264 6730


symbian.pr@bm.com
China
Joy Tian
Edelman China

+86 10 6530 8590 x 247


symbian.pr@edelman.com

Monday, November 12, 2007

Make call with CTelephony - Forum Nokia Wiki

Make call with CTelephony
From Forum Nokia Wiki

CCallDialer example illustrates how to dial a new call using CTelephony. Note that this example is intended to be used only with S60 3rd Edition devices, and does not work with pre-3rd Edition devices.

To use this example first implement the callback interface function in the implementing class and then construct an instance of the CCallDialer. The call dialing starts automatically after the construction. In case the process is successful and the callee answers the call, RunL() will be called with KErrNone; otherwise the aError argument variable will indicate the error.

To instantiate the CCallDialer, from the observing class, use something like this:

iCallDialer = new (ELeave)CCallDialer(*this);
iCallDialer->ConstructL(phoneNumber);
Then, in the notifier method of the instantiating class, you may remove the dialer and optionally check status:

void CBoopCtlContainer::CallDialedL(TInt aError)
{
delete iCallDialer;
iCallDialer = NULL;
}You may subsequently dial another number by going tru the same sequence:

iCallDialer = new (ELeave)CCallDialer(*this);
iCallDialer->ConstructL(phoneNumber2);
[edit] MakeCall.cpp
CCallDialer::~CCallDialer()
{
Cancel();
delete iTelephony;
}

void CCallDialer::ConstructL(const TDesC& aNumber)
{
iTelephony = CTelephony::NewL();
CTelephony::TTelNumber telNumber(aNumber);

CTelephony::TCallParamsV1 callParams;
callParams.iIdRestrict = CTelephony::ESendMyId;
CTelephony::TCallParamsV1Pckg callParamsPckg(callParams);

iTelephony->DialNewCall(iStatus, callParamsPckg, telNumber, iCallId);
SetActive();
}

CCallDialer::CCallDialer(MDialObserver& aObserver)
: CActive(EPriorityNormal),iObserver(aObserver)
{
CActiveScheduler::Add(this);
}

void CCallDialer::RunL()
{
iObserver.CallDialedL(iStatus.Int());
}

void CCallDialer::DoCancel()
{
iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
}


[edit] MakeCall.h
#include
// link to etel3rdparty.lib

class MDialObserver
{
public:
virtual void CallDialedL(TInt aError) = 0;
};


class CCallDialer : public CActive
{
public:
CCallDialer(MDialObserver& aObserver);
void ConstructL(const TDesC& aNumber);
~CCallDialer();
private:
void RunL();
void DoCancel();
private:
MDialObserver& iObserver;
CTelephony* iTelephony;
CTelephony::TCallId iCallId;
};

TSS000713 - Creating video and VoIP calls - Forum Nokia Wiki

Creating video and VoIP calls TSS000713
Platform(s): Device(s), SW version(s):
S60 3rd Edition
S60 3rd Edition, FP1
Category: Symbian C++
Subcategory: Networking, Telephony
Description: It is possible to initiate video and Internet telephony (VoIP) calls with the AIW Service Handler API, included in the Extensions plug-in package for S60 3rd Edition SDKs.
Video call
The following example code demonstrates how to initiate a video call.
MakeAiwCallL( _L("+3581234567"), _L("Firstname Lastname"), EAiwVideo);
// EAiwForcedVideo doesn’t show dialogs
// MakeAiwCallL( _L("+3581234567"), _L("Firstname Lastname"), EAiwForcedVideo);
void MakeAiwCallL( const TDesC& aNumber, const TDesC& aName, TAiwCallType aCallType )
{
// Create AIW service handler
CAiwServiceHandler* serviceHandler = CAiwServiceHandler::NewLC();
// Create AIW interest
RCriteriaArray interest;
CleanupClosePushL( interest );
CAiwCriteriaItem* criteria =
CAiwCriteriaItem::NewLC( KAiwCmdCall, KAiwCmdCall, _L8( "*" ) );
const TUid KUidAiwBase = { KAiwClassBase };
criteria->SetServiceClass( KUidAiwBase );
User::LeaveIfError( interest.Append( criteria ) );
// Attach to AIW interest
serviceHandler->AttachL( interest );
// Create AIW param package
TAiwDialDataV1 data;
TAiwDialDataV1Pckg dataPckg( data );
iNameBuffer = aName.Left( iNameBuffer.MaxLength() );
data.SetName( iNameBuffer );
iTelNumber = aNumber.Left( iTelNumber.MaxLength() );
data.SetTelephoneNumber( iTelNumber );
data.SetCallType( aCallType );
data.SetWindowGroup( CCoeEnv::Static()->RootWin().Identifier() );
CAiwGenericParamList& paramList = serviceHandler->InParamListL();
TPtrC8 ptr;
ptr.Set( dataPckg );
TAiwVariant variant( ptr );
TAiwGenericParam param( EGenericParamCallDialDataV1, variant );
paramList.AppendL( param );
// Execute AIW command
serviceHandler->ExecuteServiceCmdL( KAiwCmdCall,
paramList,
serviceHandler->OutParamListL() );
// destroy criteria, interest, and serviceHandler
CleanupStack::PopAndDestroy( 3 );
}
VoIP call
Using the above function, it is possible to initiate a VoIP call as follows:
MakeAiwCallL( _L("user@sip.server.com"),
_L("Firstname Lastname"),
EAiwVoIPCall );
See also:
Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, Maintenance Release
Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, supporting Feature Pack 1
Creation date: July 4, 2007

KIS000737 - No notification received from CTelephony for a second incoming call - Forum Nokia Wiki

No_notification_received_from_CTelephony_for_a_second_incoming_call

The ETEL 3rd party telephony API (CTelephony) provides a method to monitor changes in the voice line status:

void CTelephony::NotifyChange( TRequestStatus &aReqStatus,
const TNotificationEvent &aEvent,
TDes8 &aDes ) const;

If there is already an active voice call that is being monitored, no notification is received about a second incoming call. The voice line status as reported by CTelephony does not change, but remains as EStatusConnected.

Solution
Detecting a second incoming call while another is already active is not possible with CTelephony::NotifyChange().

A workaround is to use

void RLine::NotifyIncomingCall( TRequestStatus& aStatus, TName& aName);
to obtain the status for the second incoming call.

Note that RLine and other ETEL Core classes are deprecated in S60 3rd Edition, however the required headers and import libraries are still present on the SDK.

Retrieved from "http://wiki.forum.nokia.com/index.php/KIS000737_-_No_notification_received_from_CTelephony_for_a_second_incoming_call"

Thursday, November 1, 2007

Asynchronous Services example code in User library example code

Asynchronous services example codes

--------------------------------------------------------------------------------

SingleRequest: asynchronous programming without active objects

--------------------------------------------------------------------------------

Example code
These files are found in: examples\Base\IPC\Async\SingleRequest

The files reproduced here are the main files contained in the examples directory. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.

// SingleRequest.cpp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.
//
// Shows asynchronous programming (without active objects).
// Example shows how a single request can be issued, followed
// by User::WaitForRequest()


#include "CommonFramework.h"



// Do the example
LOCAL_C void doExampleL()
{
// create and initialize heartbeat timer
RTimer heartbeat; // heartbeat timer

TRequestStatus heartbeatStatus; // request status associated with it
heartbeat.CreateLocal(); // always created for this thread

// go round timing loop
for (TInt i=0; i<10; i++)
{
// issue and wait for single request
heartbeat.After(heartbeatStatus,1000000); // wait 1 second
User::WaitForRequest(heartbeatStatus); // wait for request
// to complete
// say we're here
_LIT(KFormatString1,"Tick %d\n");
console->Printf(KFormatString1, i);
}

// close timer
heartbeat.Close(); // close timer
}
This file is found in examples\Base\CommonFramework

// EUSTD.H
//
// Copyright (C) Symbian Software Ltd 1997-2005. All rights reserved.
//

#ifndef __EUSTD_H
#define __EUSTD_H

#include
#include

_LIT(KTxtEPOC32EX,"EPOC32EX");
_LIT(KTxtExampleCode,"E32 SDK Example Code");
_LIT(KFormatFailed,"failed: leave code=%d");
_LIT(KTxtOK,"ok");
_LIT(KTxtPressAnyKey," [press any key]");

// public
LOCAL_D CConsoleBase* console; // write all your messages to this
LOCAL_C void doExampleL(); // code this function for the real example

// private
LOCAL_C void callExampleL(); // initialize with cleanup stack, then do example

GLDEF_C TInt E32Main() // main function called by E32
{
__UHEAP_MARK;
CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
TRAPD(error,callExampleL()); // more initialization, then do example
__ASSERT_ALWAYS(!error,User::Panic(KTxtEPOC32EX,error));
delete cleanup; // destroy clean-up stack
__UHEAP_MARKEND;
return 0; // and return
}

LOCAL_C void callExampleL() // initialize and call example code under cleanup stack
{
console=Console::NewL(KTxtExampleCode,TSize(KConsFullScreen,KConsFullScreen));
CleanupStack::PushL(console);
TRAPD(error,doExampleL()); // perform example function
if (error)
console->Printf(KFormatFailed, error);
else
console->Printf(KTxtOK);
console->Printf(KTxtPressAnyKey);
console->Getch(); // get and ignore character
CleanupStack::PopAndDestroy(); // close console
}

#endif
// BLD.INF
// Component description file

// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

PRJ_MMPFILES

SingleRequest.mmp
// SingleRequest.mmp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

// using relative paths for source and userinclude directories

// No explicit capabilities required to run this.

TARGET SingleRequest.exe
TARGETTYPE exe
UID 0
VENDORID 0x70000001

SOURCEPATH .
SOURCE SingleRequest.cpp

USERINCLUDE .
USERINCLUDE ..\..\..\CommonFramework
SYSTEMINCLUDE \Epoc32\include

LIBRARY euser.lib

CAPABILITY None

--------------------------------------------------------------------------------

Description
This example shows how to issue and wait for a single request.

The example shows the general principles involved in asynchronous programming. It uses a simple wait loop and shows how the completion of asynchronous events are handled without active objects.

This example deliberately does not use active objects.


--------------------------------------------------------------------------------

Classes used
TRequestStatus: Asynchronous request status


--------------------------------------------------------------------------------

Security issues
The example requires no specific capabilities in order to run - and does not demonstrate any security issues.




--------------------------------------------------------------------------------

WaitLoop: asynchronous programming without active objects
Found in: examples\Base\IPC\Async\WaitLoop


--------------------------------------------------------------------------------

Description
This example shows how a wait loop can be used to identify and handle a completed request.

It shows the general principles involved in asynchronous programming. It uses a simple wait loop and shows how the completion of asynchronous events are handled without active objects.

This example deliberately does not use active objects.


--------------------------------------------------------------------------------

Classes used
TRequestStatus: asynchronous request status


--------------------------------------------------------------------------------

Security issues
The example requires no specific capabilities in order to run - and does not demonstrate any security issues.




--------------------------------------------------------------------------------

RealLifeWaitLoop: asynchronous programming without active objects
Found in: examples\Base\IPC\Async\RealLifeWaitLoop


--------------------------------------------------------------------------------

Description
As with the WaitLoop example, this example shows how a wait loop can be used to identify and handle a completed request. However, this example shows how the wait loop can deal with multiple asynchronous service providers.

The example shows the general principles involved in asynchronous programming; it uses a simple wait loop and shows how the completion of asynchronous events are handled without active objects.

This example deliberately does not use active objects.


--------------------------------------------------------------------------------

Classes used
TRequestStatus: asynchronous request status


--------------------------------------------------------------------------------

Security issues
The example requires no specific capabilities in order to run - and does not demonstrate any security issues.




--------------------------------------------------------------------------------

RunComplete: asynchronous programming with active objects
Found in: examples\Base\IPC\Async\RunComplete


--------------------------------------------------------------------------------

Description
The example shows how active objects and an active scheduler can be used to handle asynchronous events. Compare this with the following examples; SingleRequest, WaitLoop and RealLifeWaitLoop.

It demonstrates a single CMessageTimer active object which runs until completion.


--------------------------------------------------------------------------------

Classes used
TRequestStatus: asynchronous request status

CActiveScheduler: the active scheduler

CActive: active object abstraction

CTimer: timer base class (used here as a source of events)


--------------------------------------------------------------------------------

Security issues
The example requires no specific capabilities in order to run - and does not demonstrate any security issues.




--------------------------------------------------------------------------------

AcceptInput1-2: asynchronous programming with active objects
Found in: examples\Base\IPC\Async\AcceptInputX


--------------------------------------------------------------------------------

Description
These examples show how active objects and an active scheduler can be used to handle asynchronous events.

They demonstrate a single CKeyMessengerProcessor active object (derived from class CActiveConsole), which accepts input from keyboard, but does not print it. This object contains a CMessageTimer object which it activates if the user inputs the character "m" and cancelled if the user inputs "c".


--------------------------------------------------------------------------------

Classes used
TRequestStatus: asynchronous request status

CActiveScheduler: the active scheduler

CActive: active object abstraction

CTimer: timer base class (used here as a source of events)


--------------------------------------------------------------------------------

Security issues
The example requires no specific capabilities in order to run - and does not demonstrate any security issues.




--------------------------------------------------------------------------------

Fibonacci1-3: asynchronous programming with active objects
Found in: examples\Base\IPC\Async\FibonacciX


--------------------------------------------------------------------------------

Description
These examples show how active objects and an active scheduler can be used to handle asynchronous events and long-running services to maintain system responsiveness.


--------------------------------------------------------------------------------

Classes used
TRequestStatus: asynchronous request status

CActiveScheduler: the active scheduler

CActive: active object abstraction

CTimer: timer base class (used here as a source of events)


--------------------------------------------------------------------------------

Security issues
The example requires no specific capabilities in order to run - and does not demonstrate any security issues.

Client/Server example code in User library example code

Client server example code

--------------------------------------------------------------------------------

SimpleServer: simple server

--------------------------------------------------------------------------------

Example code
These files are found in: examples\Base\IPC\ClientServer\Simple

The files reproduced here are the main files contained in the examples directory. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.

// ClientServer.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.
//
#include


// server name

_LIT(KCountServerName,"CountServer");

// A version must be specifyed when creating a session with the server

const TUint KCountServMajorVersionNumber=0;
const TUint KCountServMinorVersionNumber=1;
const TUint KCountServBuildVersionNumber=1;

IMPORT_C TInt StartThread(RThread& aServerThread);


// Function codes (opcodes) used in message passing between client and server
enum TCountServRqst
{
ECountServCreate = 1,
ECountServSetFromString,
ECountServClose,
ECountServUnsupportedRequest,
ECountServIncrease,
ECountServIncreaseBy,
ECountServDecrease,
ECountServDecreaseBy,
ECountServValue,
ECountServReset
};

enum TCountServLeave
{
ENonNumericString = 99
};
// SimpleServer.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

#include

// needed for creating server thread.
const TUint KDefaultHeapSize=0x10000;

// reasons for server panic
enum TCountServPanic
{
EBadRequest = 1,
EBadDescriptor,
EMainSchedulerError,
ESvrCreateServer,
ESvrStartServer,
ECreateTrapCleanup,
ENotImplementedYet,
};


//**********************************
//CCountServServer
//**********************************
/**
Our server class - an active object - and therefore derived ultimately from CActive.
It accepts requests from client threads and forwards
them to the client session to be dealt with. It also handles the creation
of the server-side client session.
*/
class CCountServServer : public CServer2
{
public:
// Creates a new session with the server; the function
// implements the pure virtutal function
// defined in class CServer2
CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
public :
// The thread function executed by the server
static TInt ThreadFunction(TAny* aStarted);
// Function to panic the server
static void PanicServer(TCountServPanic aPanic);

protected:
CCountServServer(CActive::TPriority aActiveObjectPriority);
};


//**********************************
//CCountServSession
//**********************************
/**
This class represents a session with the server.
Functions are provided to respond appropriately to client messages.
*/
class CCountServSession : public CSession2
{
public:
CCountServSession();

//service request
void ServiceL(const RMessage2& aMessage);
void DispatchMessageL(const RMessage2& aMessage);

//services available to initialize/increase/decrease/reset and return the counter value.
void SetFromStringL(const RMessage2& aMessage);
void Increase();
void Decrease();
void IncreaseBy(const RMessage2& aMessage);
void DecreaseBy(const RMessage2& aMessage);
void CounterValue(const RMessage2& aMessage);
void Reset();

protected:
// panic the client
void PanicClient(const RMessage2& aMessage,TInt aPanic) const;

private:
TInt iCount;
};
// SimpleServer.cpp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

// The implementation of our simple server that increments and decrements a simple counter value.


//
//**NOTE**: The example does not demonstrate any security features - its purpose is simply
// to demonstrate the basic principles of client/server interaction.
//


#include "ClientServer.h"
#include "SimpleServer.h"
#include
#include


//**********************************
//CCountServServer - implementations
//**********************************

/**
Constructor takes the server priority value.

The server is an active object, and the priority value is the priority
of this active object.

It passes the priority value to the base class in the Ctor list.
By default, the session is not sharable, which is what we want here
so no second parameter is passed to the CServer2 constructor.
*/
CCountServServer::CCountServServer(CActive::TPriority aActiveObjectPriority)
: CServer2(aActiveObjectPriority)
{
}


/**
Creates a new session with the server.
*/
CSession2* CCountServServer::NewSessionL(const TVersion& aVersion,const RMessage2& /*aMessage*/) const
{
// Check that the version is OK
TVersion v(KCountServMajorVersionNumber,KCountServMinorVersionNumber,KCountServBuildVersionNumber);
if (!User::QueryVersionSupported(v,aVersion))
User::Leave(KErrNotSupported);

// CAN USE THE aMessage argument to check client's security and identity
// can make use of this later but for now ignore. AH 4/5/05
// the connect message is delivered via the RMessage2 object passed.

// do something with this later (and move it to the start of the function?)

// Create the session.
return new (ELeave) CCountServSession;
}


/**
A utility function to panic the server.
*/
void CCountServServer::PanicServer(TCountServPanic aPanic)
{
_LIT(KTxtServerPanic,"Count server panic");
User::Panic(KTxtServerPanic,aPanic);
}


//***********************************
//CCountServSession - implementations
//***********************************


/**
Constructor
*/
CCountServSession::CCountServSession()
{
}

/**
Services a client request.
*/
void CCountServSession::ServiceL(const RMessage2& aMessage)
{
TRAPD(err,DispatchMessageL(aMessage));
aMessage.Complete(err);
}

/**
Called by ServiceL()

It tests the function code and then delegates to
the appropriate function.
*/
void CCountServSession::DispatchMessageL(const RMessage2& aMessage)
{
switch (aMessage.Function())
{
case ECountServSetFromString:
SetFromStringL(aMessage);
return;
case ECountServIncrease:
Increase();
return;
case ECountServIncreaseBy:
IncreaseBy(aMessage);
return;
case ECountServDecrease:
Decrease();
return;
case ECountServDecreaseBy:
DecreaseBy(aMessage);
return;
case ECountServReset:
Reset();
return;
case ECountServValue:
CounterValue(aMessage);
return;

// This is an example of a request that we know about, but don't support.
// We cause KErrNotSupported to be returned to the client.
case ECountServUnsupportedRequest:
User::Leave(KErrNotSupported);

// Requests that we don't understand at all are a different matter.
// This is considered a client programming error, so we panic the
// client - this also completes the message.
default:
PanicClient(aMessage,EBadRequest);
return;
}
}

/**
Initialize the counter with the numeric equivalent of the descriptor contents
This function is here to demonstrate reading from the client address space.
Note that in this example, the client and the server are part of the same process,
*/
void CCountServSession::SetFromStringL(const RMessage2& aMessage)
{

// length of passed descriptor (1st parameter passed from client)
TInt deslen = aMessage.GetDesLength(0);

// Passed data will be saved in this descriptor.
RBuf buffer;

// Max length set to the value of "deslen", but current length is zero
buffer.CreateL(deslen);

// Do the right cleanup if anything subsequently goes wrong
buffer.CleanupClosePushL();

// Copy the client's descriptor data into our buffer.
aMessage.ReadL(0,buffer,0);

// Now do a validation to make sure that the string only has digits
if (buffer.Length() == 0)
{
User::Leave(ENonNumericString);
}

TLex16 lexer;

lexer.Assign(buffer);
while (!lexer.Eos())
{
TChar thechar;

thechar = lexer.Peek();
if (!thechar.IsDigit())
{
User::Leave(ENonNumericString);
}
lexer.Inc();
}

// Convert to a simple TInt value.
lexer.Assign(buffer);
if (lexer.Val(iCount))
{
User::Leave(ENonNumericString);
}

// Clean up the memory acquired by the RBuf variable "buffer"
CleanupStack::PopAndDestroy();
}


/**
Increases the session counter by default (1)
*/
void CCountServSession::Increase()
{
iCount++;
}


/**
Increases the session counter by an integer.
*/
void CCountServSession::IncreaseBy(const RMessage2& aMessage)
{
iCount = iCount + aMessage.Int0();
}

/**
Decreases the session counter by default (1)
*/
void CCountServSession::Decrease()
{
iCount--;
}


/**
Decreases the session counter by an integer.
*/
void CCountServSession::DecreaseBy(const RMessage2& aMessage)
{
iCount = iCount - aMessage.Int0();
}


/**
Resets the session counter.
*/
void CCountServSession::Reset()
{
iCount=0;
}


/**
Writes the counter value to a descriptor in the client address space.
This function demonstrates writing to the client.
*/
void CCountServSession::CounterValue(const RMessage2& aMessage)
{
TPckgBuf p(iCount);
aMessage.WriteL(0,p);
}


/**
Panics the client
*/
void CCountServSession::PanicClient(const RMessage2& aMessage,TInt aPanic) const
{
_LIT(KTxtServer,"CountServ server");
aMessage.Panic(KTxtServer,aPanic);
}



//**********************************
//Global functions
//**********************************

// The count server thread function that initialises the server.
GLDEF_C TInt CCountServServer::ThreadFunction(TAny* /**aStarted*/)
{
// get clean-up stack
CTrapCleanup* cleanup=CTrapCleanup::New();
if (cleanup == NULL)
{
CCountServServer::PanicServer(ECreateTrapCleanup);
}

// create an active scheduler and server
CActiveScheduler *pA=new CActiveScheduler;
__ASSERT_ALWAYS(pA!=NULL,CCountServServer::PanicServer(EMainSchedulerError));
CCountServServer *pS=new CCountServServer(EPriorityStandard);
__ASSERT_ALWAYS(pS!=NULL,CCountServServer::PanicServer(ESvrCreateServer));

//Install the active scheduler
CActiveScheduler::Install(pA);

// Start the server
TInt err = pS->Start(KCountServerName);
if (err != KErrNone)
{
CCountServServer::PanicServer(ESvrStartServer);
}

// Let everyone know that we are ready to
// deal with requests.
RThread::Rendezvous(KErrNone);

// And start fielding requests from client(s).
CActiveScheduler::Start();

// Tidy up...
delete pS;
delete pA;
delete cleanup;

// ...although we should never get here!
return(KErrNone);
}


/**
Create the thread that will act as the server.
This function is exported from the DLL and called by the client.

Note that a server can also be implemented as a separate
executable (i.e. as a separate process).
*/
EXPORT_C TInt StartThread(RThread& aServerThread)
{
TInt res=KErrNone;

// Create the server, if one with this name does not already exist.
TFindServer findCountServer(KCountServerName);
TFullName name;

// Need to check that the server exists.
if (findCountServer.Next(name)!=KErrNone)
{
// Create the thread for the server.
res=aServerThread.Create(KCountServerName,
CCountServServer::ThreadFunction,
KDefaultStackSize,
KDefaultHeapSize,
KDefaultHeapSize,
NULL
);

// The thread has been created OK so get it started - however
// we need to make sure that it has started before we continue.
if (res==KErrNone)
{
TRequestStatus rendezvousStatus;

aServerThread.SetPriority(EPriorityNormal);
aServerThread.Rendezvous(rendezvousStatus);
aServerThread.Resume();
User::WaitForRequest(rendezvousStatus);
}

// The thread has not been created - clearly there's been a problem.
else
{
aServerThread.Close();
}
}
return res;
}


// SimpleServer.mmp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

// using relative paths for source and userinclude directories

// exports are unfrozen

TARGET SimpleServer.dll
TARGETTYPE dll
UID 0
VENDORID 0x70000001

SOURCEPATH .
SOURCE SimpleServer.cpp

USERINCLUDE .
SYSTEMINCLUDE \Epoc32\include

LIBRARY euser.lib

CAPABILITY all


#if defined(WINS)
deffile .\SimpleServerWINS.def
#else if defined(ARM)
deffile .\SimpleServerARM.def
#endif

nostrictdef
See SimpleClient.




--------------------------------------------------------------------------------

SimpleClient: simple client

--------------------------------------------------------------------------------

Example code
These files are found in: examples\Base\IPC\ClientServer\Simple

The files reproduced here are the main files contained in the examples directory. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.

/ SimpleClient.cpp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.


//
//**NOTE**: The example does not demonstrate any security features - its purpose is simply
// to demonstrate the basic principles of client/server interaction.
//



// needed for client interface
#include "ClientServer.h"

// needed for client (doExampleL)
#include "SimpleClient.h"
#include "CommonFramework.h"


const TUint kDefaultMessageSlots=4;


//**********************************
//RCountServ
//**********************************

RCountServSession::RCountServSession()
{
}


/**
Connects to the server using 4 message slots.

In this example, the server is implemented as a separate thread.
The function starts that thread before attempting to create a session with the server.

The version information specifies the earliest version of the server that we can
talk to.
*/
TInt RCountServSession::Connect()
{
TInt r=StartThread(iServerThread);
if (r==KErrNone)
r=CreateSession(KCountServerName,Version(),kDefaultMessageSlots);
return(r);
}


/**
Returns the earliest version number of the server that we can tal to.
*/
TVersion RCountServSession::Version(void) const
{
return(TVersion(KCountServMajorVersionNumber,KCountServMinorVersionNumber,KCountServBuildVersionNumber));
}


/**
A server request to set the counter value
to the value defined in the string.
*/
TInt RCountServSession::SetFromString(const TDesC& aString)
{
TIpcArgs args(&aString);
return SendReceive(ECountServSetFromString, args);
}


/**
A server request to increase the counter value by the default value (i.e. 1)
*/
void RCountServSession::Increase()
{
SendReceive(ECountServIncrease);
}


/**
A server request to increase the counter value by the specified
integer value.
*/
void RCountServSession::IncreaseBy(TInt anInt)
{
TIpcArgs args(anInt);
SendReceive(ECountServIncreaseBy, args);
}


/**
A server request to decrease the counter value by the default value (i.e. 1).
*/
void RCountServSession::Decrease()
{
SendReceive(ECountServDecrease);
}


/**
A server request to decrease the counter value by the specified
integer value.
*/
void RCountServSession::DecreaseBy(TInt anInt)
{
TIpcArgs args(anInt);
SendReceive(ECountServDecreaseBy, args);
}

/**
A server request to reset the counter value to 0.
*/
void RCountServSession::Reset()
{
SendReceive(ECountServReset);
}


/**
A server request to get the curent value of the counter.

We pass a TPckgBuf across to the server.
*/
TInt RCountServSession::CounterValue()
{
TInt res=0;
TPckgBuf pckg;

// Note that TPckgBuf is of type TDes8
TIpcArgs args(&pckg);
SendReceive(ECountServValue, args);

// Extract the value returned from the server.
res = pckg();
return res;
}


/**
A server request to stop the server.

This is a request that is NOT implemented by the server; it is here to show
the handling of non-implemented requests.
*/
TInt RCountServSession::UnsupportedRequest()
{
return SendReceive(ECountServUnsupportedRequest);
}

/**
A request that the server knows nothing about.
*/
void RCountServSession::BadRequest()
{
SendReceive(9999);
}



/**
Closing the server and tidying up.
*/
void RCountServSession::Close()
{
RSessionBase::Close();
iServerThread.Close();
}




/**
This is the main body of the example. It connects to the server,
causing it to be created if it doesn't already exist.

It continues by making various requests on the server, displaying the results of those
requests.
*/
LOCAL_C void doExampleL()
{
_LIT(KTxtTestingCountServer,"Testing the count server \n\n");
_LIT(KTxtInitCounterWith,"\nInitialize the counter with : ");
_LIT(KTxtInitCounterFailed,"\nSetting the counter from string failed: non-numeric character detected\n");
_LIT(KTxtGetCounterValue,"\nGetting the counter value back from the server: %d \n");


// Say that we are testing the count server
console->Printf(KTxtTestingCountServer);

// This is our handle to the server
RCountServSession ss;

// Connect to the count server, starting it up if we need to
// (which in this example we do need to).
// This creates a session with the server.
User::LeaveIfError(ss.Connect());

// At this point the server appears ready to accept requests.
console->Printf(KTxtInitCounterWith);

// Initialise the counter by passing an illegal string - this should
// fail - but we will check anyway before reporting a failure.
_LIT(KTxtIllegalString,"22h4");
console->Printf(KTxtIllegalString);
TInt ret = ss.SetFromString(KTxtIllegalString);
if (ret==ENonNumericString)
{
console->Printf(KTxtInitCounterFailed);
}

// Now try and initialise the counter using a legal string.
console->Printf(KTxtInitCounterWith);
_LIT(KTxtLegalString,"224");
console->Printf(KTxtLegalString);
ret = ss.SetFromString(KTxtLegalString);
if (ret==ENonNumericString)
{
console->Printf(KTxtInitCounterFailed);
}

// Now get the value back from the server, just to see what it believes
// it has. We are expecting the value 224 (of course!!!).
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Now increase the counter value by the default value.
_LIT(KTxt1,"\nIncrease counter (default 1)..");
console->Printf(KTxt1);
ss.Increase();
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Now increase the counter value by 2.
_LIT(KTxt2,"\nIncrease counter by 2..");
console->Printf(KTxt2);
ss.IncreaseBy(2);
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Now decrease the counter value by the default value.
_LIT(KTxt3,"\nDecrease counter(default 1)..");
console->Printf(KTxt3);
ss.Decrease();
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Now increase the counter value by 7.
_LIT(KTxt4,"\nIncrease counter by 7..");
console->Printf(KTxt4);
ss.IncreaseBy(7);
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Now increase the counter value again by the default value.
_LIT(KTxt5,"\nIncrease counter(default 1)..");
console->Printf(KTxt5);
ss.Increase();
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Now decrease the counter value by 3.
_LIT(KTxt6,"\nDecrease counter by 3..");
console->Printf(KTxt6);
ss.DecreaseBy(3);
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);

// Reset counter value
_LIT(KTxt7,"\nReseting counter value to 0..");
console->Printf(KTxt7);
ss.Reset();
ret = ss.CounterValue();
console->Printf(KTxtGetCounterValue, ret);


// Call API function which is not implemented in the server
_LIT(KTxt8,"\nAbout to call the unsupported function Stop()..");
console->Printf(KTxt8);
ret = ss.UnsupportedRequest();
_LIT(KTxt9,"\nSorry, UnsupportedRequest() is not supported\n");
if (ret==KErrNotSupported)
{
console->Printf(KTxt9);
}


// This request will panic this client so do not remove the
// following comment unless you want to try it.
// ss.BadRequest();


// Close the sesssion with the count server.
ss.Close();
}
// SimpleClient.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.
//
#if !defined(__COUNTSERV_H__)
#define __COUNTSERV_H__

#if !defined(__E32BASE_H__)
#include
#endif


//**********************************
//RCountServSession
//**********************************

// Our client-side handle to a session with the server.
// The class forms a layer over the Symbian provided RSessionBase class.
//
// The class deals with the requests made by the main example code by forwarding
// them to the server. The type of request is identified by a code, one of
// the TCountServRqst enum values, and arguments are passed via a TIpcArgs object.
//
// The functions Increase(), Decrease() etc are wrappers for different calls to
// SendReceive().
//
// Most of the functions here return void; if they fail, the server panics the client.
// If they return it can be assumed that there is no error.
//
// The RThread object is a handle to the thread that is acting as the server.


class RCountServSession : public RSessionBase
{
public:
RCountServSession();
TInt Connect();
TVersion Version() const;
TInt UnsupportedRequest();
TInt SetFromString(const TDesC& aString);
void Increase();
void Decrease();
void IncreaseBy(TInt anInt);
void DecreaseBy(TInt anInt);
void Reset();
TInt CounterValue();
void BadRequest();
void Close();
private:
RThread iServerThread;
};


#endif
// ClientServer.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.
//
#include


// server name

_LIT(KCountServerName,"CountServer");

// A version must be specifyed when creating a session with the server

const TUint KCountServMajorVersionNumber=0;
const TUint KCountServMinorVersionNumber=1;
const TUint KCountServBuildVersionNumber=1;

IMPORT_C TInt StartThread(RThread& aServerThread);


// Function codes (opcodes) used in message passing between client and server
enum TCountServRqst
{
ECountServCreate = 1,
ECountServSetFromString,
ECountServClose,
ECountServUnsupportedRequest,
ECountServIncrease,
ECountServIncreaseBy,
ECountServDecrease,
ECountServDecreaseBy,
ECountServValue,
ECountServReset
};

enum TCountServLeave
{
ENonNumericString = 99
};
The file "commonFramework.h" is found in examples/Base/CommonFramework

#ifndef __EUSTD_H
#define __EUSTD_H

#include
#include

_LIT(KTxtEPOC32EX,"EPOC32EX");
_LIT(KTxtExampleCode,"E32 SDK Example Code");
_LIT(KFormatFailed,"failed: leave code=%d");
_LIT(KTxtOK,"ok");
_LIT(KTxtPressAnyKey," [press any key]");

// public
LOCAL_D CConsoleBase* console; // write all your messages to this
LOCAL_C void doExampleL(); // code this function for the real example

// private
LOCAL_C void callExampleL(); // initialize with cleanup stack, then do example

GLDEF_C TInt E32Main() // main function called by E32
{
__UHEAP_MARK;
CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
TRAPD(error,callExampleL()); // more initialization, then do example
__ASSERT_ALWAYS(!error,User::Panic(KTxtEPOC32EX,error));
delete cleanup; // destroy clean-up stack
__UHEAP_MARKEND;
return 0; // and return
}

LOCAL_C void callExampleL() // initialize and call example code under cleanup stack
{
console=Console::NewL(KTxtExampleCode,TSize(KConsFullScreen,KConsFullScreen));
CleanupStack::PushL(console);
TRAPD(error,doExampleL()); // perform example function
if (error)
console->Printf(KFormatFailed, error);
else
console->Printf(KTxtOK);
console->Printf(KTxtPressAnyKey);
console->Getch(); // get and ignore character
CleanupStack::PopAndDestroy(); // close console
}

#endif
// SimpleClient.mmp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

// using relative paths for source and userinclude directories

TARGET SimpleClient.exe
TARGETTYPE exe
UID 0
VENDORID 0x70000001

SOURCEPATH .
SOURCE SimpleClient.cpp

USERINCLUDE .
USERINCLUDE ..\..\..\CommonFramework
SYSTEMINCLUDE \Epoc32\include

LIBRARY euser.lib SimpleServer.lib
// BLD.INF
// Component description file
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

PRJ_MMPFILES

SimpleServer.mmp
SimpleClient.mmp

--------------------------------------------------------------------------------

Description
This pair of examples shows a simple use of the client server interface. The client, SimpleClient, has a single session with the server SimpleServer, implemented as a statically linked DLL.


--------------------------------------------------------------------------------

Build Notes
The server must be built before the client. This requirement is specified in the component description file, bld.inf. SimpleServer.mmp is listed before SimpleClient.mmp. Build activities relating to particular .mmp files are carried out in the order in which they are listed in the bld.inf file.


--------------------------------------------------------------------------------

Classes used
RSessionBase: client side session

CServer2: the server base class

CSession2: the server's session class




--------------------------------------------------------------------------------

ComplexServer: server supporting multiple subsessions

--------------------------------------------------------------------------------

Example code
Found in: examples\Base\IPC\ClientServer\Complex

The files reproduced here are the main files contained in the examples directory. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.

// ComplexServer.cpp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

#include "ComplexClientAndServer.h"
#include "ComplexServer.h"
#include
#include

//
//NOTE**: The example does not demonstrate any security features - its purpose is simply
// to demonstrate the basic principles of client/server interaction.
//


/**
The count server thread function that initialises the server.
*/
TInt CCountServer::ThreadFunction(TAny* /**aStarted*/)
{
// Useful TInt variable
TInt err;

// create cleanup stack
CTrapCleanup* cleanup = CTrapCleanup::New();
if (cleanup == NULL)
{
PanicServer(ECreateTrapCleanup);
}

// Create an active scheduler.
CActiveScheduler* pScheduler=new CActiveScheduler;
__ASSERT_ALWAYS(pScheduler,PanicServer(EMainSchedulerError));
// Install the active scheduler.
CActiveScheduler::Install(pScheduler);

// Create the server object.
CCountServer* pServer = NULL;
TRAP(err,pServer = CCountServer::NewL(EPriorityStandard));
__ASSERT_ALWAYS(!err,CCountServer::PanicServer(ESvrCreateServer));

// Start the server
err = pServer->Start(KCountServerName);
if (err != KErrNone)
{
CCountServer::PanicServer(ESvrStartServer);
}

// Let everyone know that we are ready to
// deal with requests.
RThread::Rendezvous(KErrNone);

// And start fielding requests from client(s).
CActiveScheduler::Start();

// Tidy up...
delete pServer;
delete pScheduler;
delete cleanup;

// ...although we should never get here!
return KErrNone;
}


/**
Create the thread that will act as the server.
This function is exported from the DLL and called by the client.

Note that a server can also be implemented as a separate
executable (i.e. as a separate process).
*/
EXPORT_C TInt StartThread(RThread& aServerThread)
{
TInt res=KErrNone;

// Create the server, if one with this name does not already exist.

TFindServer findCountServer(KCountServerName);
TFullName name;

// Need to check that the server exists.
if (findCountServer.Next(name)!=KErrNone)
{
// Create the thread for the server.
res=aServerThread.Create(KCountServerName,
CCountServer::ThreadFunction,
KDefaultStackSize,
KDefaultHeapSize,
KDefaultHeapSize,
NULL
);
// The thread has been created OK so get it started - however
// we need to make sure that it has started before we continue.
if (res==KErrNone)
{
TRequestStatus rendezvousStatus;

aServerThread.SetPriority(EPriorityNormal);
aServerThread.Rendezvous(rendezvousStatus);
aServerThread.Resume();
User::WaitForRequest(rendezvousStatus);
}

// The thread has not been created - clearly there's been a problem.
else
{
aServerThread.Close();
}
}
return res;
}
// ComplexServer.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

#if !defined(__ComplexServer_H__)
#define __ComplexServer_H__

//needed for creating server thread.
const TUint KDefaultHeapSize=0x10000;

// panic reasons
enum TCountServPanic
{
EBadRequest = 1,
EBadDescriptor,
EDescriptorNonNumeric,
EMainSchedulerError,
ESvrCreateServer,
ESvrStartServer,
ECreateTrapCleanup,
EBadCounterRemove,
EBadSubsessionHandle
};




/*
CCountServer class

Represents the server.

The server starts with the first client connect call.
Start includes setting up active scheduler, the server active object,
and the object container index which produces object object containers for each session.
*/
class CCountServer : public CServer2
{
public:


// Creates a new session with the server; the function
// implements the pure virtutal function
// defined in class CServer2
CSession2* NewSessionL(const TVersion &aVersion,const RMessage2& aMessage) const;

public:
// Creats a new server object
static CCountServer* NewL(CActive::TPriority aActiveObjectPriority);

// The thread function executed by the server
static TInt ThreadFunction(TAny* aStarted);

// utility function to panic the server.
static void PanicServer(TCountServPanic aPanic);

public :
// Constructor
CCountServer(CActive::TPriority aActiveObjectPriority);

// Second phase constructor
void ConstructL();

// Returns an object container, and guaranteed
// to produce object containers with unique
// ids within the server.
// Called by a new session to create a container
CObjectCon* NewContainerL();

// Destructor; exists to do some tidying up.
~CCountServer();

private:
// The server has an object container index that
// creates an object container for each session.
CObjectConIx* iContainerIndex;
};




/*
CCountSession class

Represents a session with the server.

Functions are provided to respond appropriately to client messages.
A session can own any number of subsession objects.
*/
class CCountSubSession;
class CCountSession : public CSession2
{
public:
// Create the session
static CCountSession* NewL();

public:
// Constructor
CCountSession();

// Called by client/server framework after
// session has been successfully created
void CreateL();

// Service request
void ServiceL(const RMessage2& aMessage);
void DispatchMessageL(const RMessage2& aMessage);

// Creates new subsession
void NewCounterL(const RMessage2& aMessage);

// Closes the session
void CloseSession();

// Gets the number of resources (i.e. CCountSubSession objects)
void NumResources(const RMessage2& aMessage);

// Utility to return the CCountSubSession (subsession) object
CCountSubSession* CounterFromHandle(const RMessage2& aMessage,TInt aHandle);

// Delete the subsession object through its handle.
void DeleteCounter(TInt aHandle);

// Gets the number of server-side subsession objects.
TInt CountResources();

// Panics client
void PanicClient(const RMessage2& aMessage,TInt aPanic) const;

private:
// Object container for this session.
CObjectCon *iContainer;

// Object index which stores objects
// (CCountSubSession instances) for this session.
CObjectIx* iCountersObjectIndex;

// Total number of resources. In this example
// a resource is just the number of CCountSubSession objects.
TInt iResourceCount;
};




/*
CCountSubSession class

Represents a subsession of CCountSession.
*/
class CCountSubSession : public CObject
{
public:
// creates a new CCountSubSession object.
static CCountSubSession* NewL(CCountSession* aSession);

public:
CCountSubSession(CCountSession* aSession);
void ConstructL(CCountSession* aSession);
void SetFromStringL(const RMessage2& aMessage);
void Increase();
void IncreaseBy(const RMessage2& aMessage);
void Decrease();
void DecreaseBy(const RMessage2& aMessage);
void Reset();
void CounterValue(const RMessage2& aMessage);

protected:
// The session that owns this CCountSubSession object.
CCountSession* iSession;

private:
// The counter value
TInt iCount;
};

#endif
// ComplexClientAndServer.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

#if !defined(__ComplexClientAndServer_H__)
#define __ComplexClientAndServer_H__

#include

//server name

_LIT(KCountServerName,"MultiCountServer");

//the server version. A version must be specifyed when creating a session with the server
const TUint KCountServMajorVersionNumber=0;
const TUint KCountServMinorVersionNumber=1;
const TUint KCountServBuildVersionNumber=1;

//
IMPORT_C TInt StartThread(RThread& aServerThread);


//opcodes used in message passing between client and server
enum TCountServRqst
{
ECountServCreateSubSession = 1,
ECountServCloseSubSession,
ECountServInitSubSession,
ECountServCloseSession,
ECountServIncrease,
ECountServIncreaseBy,
ECountServDecrease,
ECountServDecreaseBy,
ECountServValue,
ECountServReset,
ECountServResourceCountMarkStart,
ECountServResourceCountMarkEnd,
ECountServResourceCount
};


enum TCountServLeave
{
ENonNumericString = 99
};

#endif
// ComplexServer.mmp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

// using relative paths for source and userinclude directories

// no special capabailties required by this DLL

TARGET ComplexServer.dll
TARGETTYPE dll
UID 0
VENDORID 0x70000001

SOURCEPATH .
SOURCE ComplexServer.cpp
SOURCE ComplexServerCCountServer.cpp
SOURCE ComplexServerCCountSession.cpp
SOURCE ComplexServerCCountSubSession.cpp

USERINCLUDE .
SYSTEMINCLUDE \Epoc32\include

LIBRARY euser.lib

#if defined(WINS)
deffile .\ComplexServerWINS.def
#else if defined(ARM)
deffile .\ComplexServerARM.def
#endif
nostrictdef

CAPABILITY None
Found in: examples\Base\IPC\ClientServer\Complex

See ComplexClient: Client requiring multiple server subsessions.




--------------------------------------------------------------------------------

ComplexClient: client requiring multiple server subsessions
Found in: examples\Base\IPC\ClientServer\Complex

The files reproduced here are the main files contained in the examples directory. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.


--------------------------------------------------------------------------------

Example code
// ComplexClient.cpp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.


#include "ComplexClientAndServer.h"
#include "ComplexClient.h"
#include "CommonFramework.h"



/**
This is the main body of the example. It makes a connection
connects with the server, causing it to be created if it does not
already exist.

It continues by making various requests on the server, displaying
and the results of those requests.

**NOTE**: The example does not demonstrate any security features - its purpose is simply
to demonstrate the basic principles of client/server interaction.
*/

LOCAL_C void doExampleL()
{
_LIT(KTxtTestingCountServer,"Testing the count server test with 2 client subsessions; these represent independent counters \n\n");
_LIT(KTxtInitCounterAWith,"\nInitialize counter A with : ");
_LIT(KTxtInitCounterBWith,"\nInitialize counter B with : ");
_LIT(KTxtInitCounterFailed,"\nSetting the counter from string failed: non-numeric character detected\n");
_LIT(KTxtInitCounterSucceeded,"\nSetting the counter from string succeededd\n");
_LIT(KTxtGetCounterAValue,"Getting counterA value from server: %d \n");
_LIT(KTxtGetCounterBValue,"Getting counterB value from server: %d \n");
_LIT(KMsgPressAnyKey," (press any key to continue)\n");
// Useful integer variable.
TInt ret;

// Say that we are testing the count server.
console->Printf(KTxtTestingCountServer);

// This is our handle to the server.
RCountSession countserv;

// Connect to the count server, starting it up if we need to
// (which in this example we do need to).
// This creates a session with the server.
User::LeaveIfError(countserv.Connect());


// Set up the first subsession with the count server.
// We need to pass our handle to the server.
RCountSubSession counterA;
counterA.Open(countserv);
console->Printf(KTxtInitCounterAWith);


// Initialise the counter by passing an illegal string - this
// should fail - but we will check anyway before reporting
// a failure.
_LIT(KTxtIllegalString,"2a");
console->Printf(KTxtIllegalString);
ret = counterA.SetFromString(KTxtIllegalString);
if (ret==ENonNumericString)
{
console->Printf(KTxtInitCounterFailed);
}
else
{
console->Printf(KTxtInitCounterSucceeded);
}


// Set up the second subsession with the count server.
// We need to pass our handle to the server.
RCountSubSession counterB;
counterB.Open(countserv);
console->Printf(KTxtInitCounterBWith);


// Initialise the counter by passing a legal string.
_LIT(KTxtLegalString,"100");
console->Printf(KTxtLegalString);
ret = counterB.SetFromString(KTxtLegalString);
if (ret==ENonNumericString)
{
console->Printf(KTxtInitCounterFailed);
}
else
{
console->Printf(KTxtInitCounterSucceeded);
}

console->Printf(KMsgPressAnyKey);
console->Getch();
console->ClearScreen();


// Now get the initial values back from the server.
// The 1st subsession should have a default value (because we initialised it with an illegal value).
// The 2nd subsession should have the value we specified (because we initialised it witha legal value).
console->Printf(KTxtGetCounterAValue,counterA.CounterValue());
console->Printf(KTxtGetCounterBValue,counterB.CounterValue());


// Increase CounterA by the default value
_LIT(KTxt1,"\nIncrease counterA by default value (i.e. 1)..\n");
console->Printf(KTxt1);
counterA.Increase();
console->Printf(KTxtGetCounterAValue,counterA.CounterValue());

// Increase CounterA by 2
_LIT(KTxt2,"\nIncrease counterA by 2..\n");
console->Printf(KTxt2);
counterA.IncreaseBy(2);
console->Printf(KTxtGetCounterAValue,counterA.CounterValue());

// Increase CounterB by the default value
_LIT(KTxt3,"\nIncrease counterB by default value (i.e. 1)..\n");
console->Printf(KTxt3);
counterB.Increase();
console->Printf(KTxtGetCounterBValue,counterB.CounterValue());

// Increase CounterA by 7
_LIT(KTxt4,"\nIncrease counterA by 7..\n");
console->Printf(KTxt4);
counterA.IncreaseBy(7);
console->Printf(KTxtGetCounterAValue,counterA.CounterValue());

// Increase CounterB by 5
_LIT(KTxt5,"\nIncrease counterB by 5..\n");
console->Printf(KTxt5);
counterB.IncreaseBy(5);
console->Printf(KTxtGetCounterBValue,counterB.CounterValue());

// Decrease CounterA by the default value
_LIT(KTxt6,"\nDecrease counterA..\n");
console->Printf(KTxt6);
counterA.Decrease();
console->Printf(KTxtGetCounterAValue,counterA.CounterValue());

// Decrease CounterB by 3
_LIT(KTxt7,"\nDecrease counterB by 3..\n");
console->Printf(KTxt7);
counterB.DecreaseBy(3);
console->Printf(KTxtGetCounterBValue,counterB.CounterValue());

// Show the number of resources in use.
_LIT(KTxt8,"\nResource count is.. %d \n");
console->Printf(KTxt8,countserv.ResourceCount());

//close both subsessions

_LIT(KTxt9,"\nClosing counterA and then CounterB..\n");
console->Printf(KTxt9);
counterA.Close();
counterB.Close();


// Close the sesssion with the count server.
countserv.Close();

// NB in this example, it is possible to close the session before closing the
// subsessions. This is because the subsessions are themsleves closed as a
// consequence of closing the session - also the subsessions offer a simple
// (almost trivial) synchronous service.
// In more complex cases, you would need to think through the consequences
// of closing a session, while a subsession is sill open.
}
// ComplexClientAndServer.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

#if !defined(__ComplexClientAndServer_H__)
#define __ComplexClientAndServer_H__

#include

//server name

_LIT(KCountServerName,"MultiCountServer");

//the server version. A version must be specifyed when creating a session with the server
const TUint KCountServMajorVersionNumber=0;
const TUint KCountServMinorVersionNumber=1;
const TUint KCountServBuildVersionNumber=1;

//
IMPORT_C TInt StartThread(RThread& aServerThread);


//opcodes used in message passing between client and server
enum TCountServRqst
{
ECountServCreateSubSession = 1,
ECountServCloseSubSession,
ECountServInitSubSession,
ECountServCloseSession,
ECountServIncrease,
ECountServIncreaseBy,
ECountServDecrease,
ECountServDecreaseBy,
ECountServValue,
ECountServReset,
ECountServResourceCountMarkStart,
ECountServResourceCountMarkEnd,
ECountServResourceCount
};


enum TCountServLeave
{
ENonNumericString = 99
};

#endif
// ComplexClient.h
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.


#if !defined(__ComplexClient_H__)
#define __ComplexClient_H__

#include

/**
RCountSession

The client-side handle to a session with the server,
The class forms a layer over the Symbian provided RSessionBase class.

The class deals with the requests made by the main example code by forwarding
them to the server. The type of request is identified by a code, one of
the TCountServRqst enum values, and arguments are passed via a TIpcArgs object.
*/
class RCountSession : public RSessionBase
{
public:
RCountSession();
TInt Connect();
TVersion Version() const;
TInt ResourceCount();
void Close();
private:
RThread iServerThread;
};


/**
RCountSubSession

The class represents a subsession of the session represented
by RCountSession.
*/
class RCountSubSession : public RSubSessionBase
{
public:
TInt Open(RCountSession& aServer);
TInt SetFromString(const TDesC& aString);
void Close();
void Increase();
void Decrease();
void IncreaseBy(TInt anInt);
void DecreaseBy(TInt anInt);
void Reset();
TInt CounterValue();
};


#endif
// ComplexClient.mmp
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

// using relative paths for source and userinclude directories

// No special capabilities required by this executable

TARGET ComplexClient.exe
TARGETTYPE exe
UID 0
VENDORID 0x70000001

SOURCEPATH .
SOURCE ComplexClient.cpp
SOURCE ComplexClientSession.cpp
SOURCE ComplexClientSubSession.cpp

USERINCLUDE .
USERINCLUDE ..\..\..\CommonFramework
SYSTEMINCLUDE \Epoc32\include

LIBRARY euser.lib ComplexServer.lib

CAPABILITY None
// BLD.INF
// Component description file
//
// Copyright (C) Symbian Software Ltd 2000-2005. All rights reserved.

PRJ_MMPFILES

ComplexServer.mmp
ComplexClient.mmp

--------------------------------------------------------------------------------

Description
This pair of examples shows a more complex use of the client server interface. The server can support multiple subsessions within a single session, represented by the code in ComplexServer***; ComplexClient*** is the corresponding client code.


--------------------------------------------------------------------------------

Build Notes
The server must be built before the client. This requirement is specified in the component description file bld.inf. ComplexServer.mmp is listed before ComplexClient.mmp. Build activities relating to particular .mmp files are carried out in the order in which they are listed in the bld.inf file.


--------------------------------------------------------------------------------

Classes used
RSessionBase

RSubSessionBase

CServer2

CSession2

CObject

CObjectCon

CObjectConIx


--------------------------------------------------------------------------------

Security issues
The example does not demonstrate security issues - its purpose is just to demonstrate the mechanics of the client server relationship.