Resolvr Tutorial

1. Getting started with Resolvr

To get started with Resolvr, you first require a working Symbian development environment. This means at minimum the SDK for your UI platform of choice. At the time of writing Resolvr only officially supports S60 3rd edition phones, although it is trivial to compile a working version for UIQ 3, and indeed official UIQ 3 support is coming shortly.

Download the Resolvr SDK, and unzip it in to your SDK directory. You should now have all the library headers in \epoc32\include\zeroconf, and the client library and other supporting binaries in the appropriate release directories.

Software that wishes to make use of the Resolvr framework must have the NetworkServices capability, and link against the client library zeroconfclient_20008BAC.lib.

2. First steps with Resolvr

So you've downloaded and installed the SDK. What can you do now? Lets start by building a trivial application to find all the service types available on the local network. The main client class for using the Resolvr framework is called RZeroconfSession, and to use it your application needs to include the header zeroconfclient.h.

Code to do that might look like this:

		#include <es_sock.h>
		#include <zeroconfclient.h>
		#include <zeroconfservicetype.h>


		/* we need to create an internet access point to use the Resolvr server */
		RSocketServ serv;
		User::LeaveIfError(serv.Connect());
		CleanupClosePushL(serv);
		
		RConnection conn;
		User::LeaveIfError(conn.Open(serv));
		CleanupClosePushL(conn);

		User::LeaveIfError(conn.Start());

		/* retrieve the IAP number, and use it to open a session with Resolvr */
		TUint32 iap(0);
		_LIT(KCommdbIapSetting, "IAP\\Id");
		User::LeaveIfError(iConnection.GetIntSetting(KCommdbIapSetting, iap));

		Zeroconf::RZeroconfSession resolvr;
		resolvr.OpenL(iap);
		CleanupClosePushL(resolvr);

		/* now, hint to resolvr we'd like to know about service types,
		   then fetch the array of currently known types */
		resolvr.HintServiceTypesL();

		RPointerArray types;
		CleanupResetAndDestroyPushL(types);
		resolvr.ServiceTypesL(types);
		
		CleanupStack::PopAndDestroy(4, &serv); // conn, resolvr, types
		

A complete services browser example that does this and more is available in the SDK, in the examples directory.

3. Running the example

Coming soon...