symbian

unsigned char* to const TDesC8 in Symbian C++

Hi I wanna send an unsigned char * over the Socket whereas the RSockt.Send has the following signature: IMPORT_C void Send(const TDesC8 &aDesc, TUint someFlags, TRequestStatus &aStatus); I tried to do it the following way but that gives me an error message: Socket.Send( TPtrC8 ptr((TUint8*)charvariable), 0, iStatus); Error #254: Ty...

Nokia 6600 battery status detecter

Hey all, I need to write a mobile application (midlet) that will run on Nokia 6600 (SDK 60 2nd Edition CW). the application's goal is to detect power interruptions(whenever there is no more electrical power going into the battery) and log them. this mobile application will be comprised of two modules : 1) a J2ME module, mainly for in...

How to circumvent Symbian naming conventions?

I'm about to write a C++ library that is to be used by a Windows application as well as on Symbian. Linux is not a current requirement but should generally be possible, too. For this reason I would like to use the STL/Boost naming conventions instead of Symbian's, which I think, are hard to get used to. This seems to already present a pr...

TBuf to TInt Symbian

Hi I simply wanna convert a TBuf to TInt in Symbian. I tried to do it the following way: TBuf<2> buf; buf.Copy( _L("10")); TInt valInt; TLex8 lex(buf); lex.Val(valInt); Here I get then the error message: Error: #289: no instance of constructor "TPtrC8::TPtrC8" matches the argument list argument types are: (TBuf<2>) Help ...

mobile game monetization sdk

Hi, I developed a game for Windows Mobile. I am looking for a platform/SDK such that it will allow me sell extra levels and other in game items. There are SDKs for adding ads to the game (e.g. admob) but that is not what I am interested in. Basically I need a platform that will handle purchases for me. And they provide APIs that would a...

Symbian C++: TBuf Question

Hi I have a TBuf variable in my code that looks as follows: TBuf<100> test; test.Copy( _L("02somestringofrandomlength")); What I would like to do now, is to ignore the number (which takes the first two characters). Is there a nice way to extract the variable-length string from the test variable and thereby dismissing the number at th...

Shared Memory Example for Symbian

Hi I would like to share some memory between two processes. Unfortunately I cannot find any useful examples when using google. The only thing that comes up is how P.I.P.S can be used. But I remember that it could be done in another way, similar to the one of creating of message queues. Would be great if someone could point me in the rig...

Problems with Symbian descriptor assignment

Hi, Once again I am struggeling with Symbians Descriptors... char fileName[128] = "somethingsomething"; Next I have then en TEntry object which has a member iName. To this iName I would like to assign my fileName. I tried to do it as follows: TEntry anEntry; anEntry.iName.Copy((TText8* )rEntity->fileName); - no instance of overl...

strcpy in Symbian?

Hi I am looking for a strcpy equivalent in Symbian. I do not wanna use the strcpy function from stdlib. Here is what I wanna do: char name[128]; TBuf8 aName = _L("Test"); strncpy( name, aName.Ptr(), 127 ); *( name + MAX_FILENAME_LEN ) = 0; So basically I wanna copy a TBuf8 to an char array. Is there a proper way to do that in Symbi...

Printable characters in Symbian

Hi Normalley, one could use the isprint(int) function to determine if a character is printable or not. This function is included in the estlib.lib in Symbian. Unfortunately, the capabilities do not allow me to link against this library. Therefore, I wondering if anybody knows an alternative way to figure out wether a character is printa...

ReceiveOneOrMore returns wrong length in Symbian

Hi I am doing some socket stuff on Symbian, which works fine so far. However, I am facing a weird problem when trying to read out the data that has been sent. Assume the code looks as follows: TSockXfrLength len; iSocket.RecvOneOrMore( buff, 0, iStatus, len ); User::WaitForRequest(iStatus); if (iStatus == KErrNone) { print...

PyS60 on device debug ?

A simple matter makes me suffering as I'm new to PyS60 development. What is the IDE for Executing program on-device with a single reasonable amount of clicks, Typical step-into, step-over, run-to, watch (used from PC) for the on-device running program ? ...

Symbian panics when deleting dynamic array

Hi I am trying to allocate a char array of size 1000. This array is passed to a function where it should be filled with the data that has been received from the TCP Socket. The problem occurs then when I try to delete[] buffer: Here I get as a result a User Panic 42. Unfortunately, I do not really see what is going wrong in this simple ...

Main Panic 42 when allocating dynamic array

Hi, Until now I thought that a Main Panic 42 occurs only when I try to access data that is outside of boundaries of an array for instance. Thanks to some nice feedback of you guys I was able to solve me other problem. However, what happens now is that I get this Panic when trying to allocate a char array as follows unsigned char *buf =...

Symbian: How to write HBufC* to file

Hi, I am trying to read data from a file into an HBufC8 variable and then write the same data into another file. Here is my testcode; the inner loop of the read repeats 4 times to read 5000 chars in each iteration. However, when I try to write the data back into a file, the file "testfile.txt" is empty. Will play a little bit more arou...

Thread termination in Symbian

I'm getting a little frustrated with the definition of Thread Termination they have in Symbian. Please, correct me if I am wrong. Threads in Symbian OS can end their life in 4 different ways: When thread function exits normally; When User::Exit() is called for current thread; When thread is forced to die by calling RThread::Kill() or R...

speex implementation in S60 3rd edition

Hi, anybody implement speex in 3rd edition.. please guide me....how to generate dll/lib with the help of speex api and use..? b'coz it shows error for math.h stdlib.h basic c file Thanks & Regards, Rahul.... ...

Optimizing Sockets in Symbian

Hi I have a TCP connection opened between Symbian and a Server machine and I would like to transfer huge chunks of data (around 32K) between these two endpoints. Unfortuantely, the performance figures are pretty poor and I am looking for ideas how I could improve my implementation. One of the things I tried was to increase the number of...

Speex in symbian

Hi, I want to convert a wav file to speex format .I am getting issue that it doesnt get the proper header for ogg conversion,It reads the wave header and when it tries to write the ogg header it runs infinte loop . Thanks in advance . ...

Symbian character printing

I am attempting to construct a very simple proof of concept that I can write a web service and actually call the service from a symbian environment. The service is a simple Hello service which takes a name in the form of a const char* and returns back a greeting of the form "hello " + name in the form of a char*. My question is, how do I...