I am working on a project in C using libgnokii (www.gnokii.org) for reading sms from a cell phone, but I'm stuck with a problem that I think is C related rather than a problem with the library. The whole thing is more than a little confusing; I'll try to explain the best I can.
The function used to access gnokii's capabilities is below
The variable "data" is a struct holding pointers to all the
gn_error gn_sm_functions(gn_operation op, gn_data *data, struct gn_statemachine *sm);
different variables needed for any operation. Before an operation,
it is up to the programmer to fill the pointers of the variables
necessary to complete the operation.
For example, to check the cell phone's battery level:
I am having trouble with the specific struct member below.
float battery_level = 0;
data.battery_level = &battery_level;
error = gn_sm_functions(GN_OP_GetBatteryLevel, &data, state);
Is this a pointer to a 2d array? I tried the following
but the second line keeps giving me the error
data.message_list = &smsmessagelist;
error = gn_sm_functions(GN_OP_GetSMS, &data, state);
"error: incompatible types in assignment"
Any Help is greatly appreciated.