Re: Last cry for help

2005-06-17 Thread katie

My software currently uses the serviceListType stucture from NetServiceAPI.h 
(not published) but it appears to have changed in the Garnet 4.5.7 OS release 
an later (I'm using a TREO650) Does anyone know what the new struct looks like? 

Old Struct
// serviceListType is the parameter for the 
sysSvcLaunchCmdGetServiceList action code 
typedef struct 
{ 
Err error; 
UInt16 numServices; // number of services available 
MemHandle IDListH; // MemHandle to an array of serviceIDs 
MemHandle nameListH; 
} serviceListType; 
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: Last cry for help

2002-01-29 Thread Ralph Krausse

Thanks Bob, don't know if we will join, I will look into it.


Ralph

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Last cry for help

2002-01-29 Thread Gavin Peacock


Ok, I can't resist a last cry for help...

So there is a way to list and select the active network panel 
connection. This API has existed ever since OS 2.0 when netlib was 
introduced. The API does not allow you add a new network connection, 
but you can make an existing one active.

There are a series of launch codes you can send to the network panel. 
The launch codes are defined in SystemMgr.h

#define sysSvcLaunchCmdSetServiceID 20
#define sysSvcLaunchCmdGetServiceID 21
#define sysSvcLaunchCmdGetServiceList   22
#define sysSvcLaunchCmdGetServiceInfo   23

I had created a header file that was supposed to be part of the SDK, 
but it doesn't look like it was released. Here is the important 
information from
NetServiceAPI.h:

#define maxServiceNameLen 32// max length of a service name

typedef UInt32 ServiceIDType;
#define svcNoServiceSelectedID  (0)

// serviceListType is the parameter for the 
sysSvcLaunchCmdGetServiceList action code
typedef struct
{
Err error;
UInt16 numServices; // number of services available
MemHandle IDListH;  // MemHandle to an array of serviceIDs
MemHandle nameListH;
} serviceListType;

typedef serviceListType * serviceListPtr;

// serviceInfoType is the parameter for the 
sysSvcLaunchCmdGetServiceInfo action code
typedef struct
{
Err error;
ServiceIDType   serviceID;  // passed in 
to specify service you want info about
UInt32  reserved;   // RESERVED -- SET TO ZERO
CharserviceName[maxServiceNameLen]; // returns 
name of service
} serviceInfoType;

typedef serviceInfoType * serviceInfoPtr;



sysSvcLauchCmdSetServiceID expects cmdPBD to point to a valid 
ServiceIDType value.

You can get the currently active serivce ID value by launching 
sysSvcCmdGetServiceID  with cmdPBP pointing to  a ServiceIDType value 
to hold the result.

sysSvcLaunchCmdGetServiceInfo can be used to get the name of a 
service by its ID value, cmdPBP must point to a service InfoType 
structure.


Finally you can get a list of all available services by ID and name. 
This allows you to display a list of available services to the user 
and get the service ID of the selected item. CmdPBP is passed with a 
serviceListType structure. The structure will return with a number of 
services and two memory handles. Your application is responsible for 
freeing the handles. The first handle contains a list of numServices 
serviceID UInt32 values. The second handle contains a packed list of 
numservices null terminated string service names.

you can covert the string list to an array of pointers with the call 
SysFormPointerArrayToStrings()

I hope this helps.

--- Gavin
-- 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Last cry for help

2002-01-29 Thread Bob Whiteman

Gavin Peacock [EMAIL PROTECTED] wrote in message
news:74994@palm-dev-forum...


 Ok, I can't resist a last cry for help...

 So there is a way to list and select the active network panel
 connection. This API has existed ever since OS 2.0 when netlib was
 introduced. The API does not allow you add a new network connection,
 but you can make an existing one active.
 [...]
 I hope this helps.

 --- Gavin


Thanks for the info Gavin.

Can you solve the mystery of the missing NetServiceAPI library? I've scoured
the palmos.com web site and I can't find it. I've even found dead links to
knowledge base articles about it. Has Palm upgraded it to support new OS
versions? Is there a version which supports removing a network service?

Bob Whiteman
Senior Software Engineer
Pico Communications



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/



Re: Last cry for help

2002-01-28 Thread Bob Whiteman

 Ralph Krausse [EMAIL PROTECTED] wrote in message
news:74916@palm-dev-forum...

 I need some explanation here. I am simply or I thought, trying to change
 some settings in my application so users don't have to manually go to
 the perfs application and change it themselves. First I want to change
 under pref-connection from Palm Modem US/Canada to Direct Serial.
 Second, under pref-Network, I want to change the Service from Aminet to
 WindowRAS.

Ralph, I think I can explain what's going on.

There's two different systems within the Palm OS that need to be configured.
The first is the connection panel. This can be straightforwardly updated
using the Cnc* functions defined by the Connection Manager. According to my
copy of the documentation these were created in the new OS 4.0.

The second system is the network panel. As I understand it there's a network
database that holds a list of services and their configurations, and
possibly other databases as well. Somewhere there is also a database which
stores information about the currently selected network service.

The biggest difficulty is that the network stack is running in the only
other thread on the device. There's no official way of notifying that other
thread that the databases have changed.

Another difficulty is that the network system and its data formats have
changed several times over the last few versions of the Palm OS.

Palm Developer Technical Support once made available the NetServiceAPI, an
/unsupported/ library which gives you the ability to create network
services, modify network services, and set the current active service. I
believe that they no longer make this available because it has not been
updated to support the newest versions of the Palm OS.

Without this library, I don't think there is any way to do what you want.

I suggest that you join the Palm OS Developer Program and get an Advantage
Level Membership. http://www.palmos.com/dev/programs/pdp/index.html Then you
can submit your request to them as a developer support incident. Perhaps
they can provide an updated version of the NetServiceAPI library. If you do
join, please let me know what they say.

Bob Whiteman
Senior Software Engineer
Pico Communications



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/