1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/lbs/lbshostsettings.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,160 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This file defines the interface to the list of remote hosts used
1.18 +// by the LBS subsystem.
1.19 +//
1.20 +//
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedPartner
1.25 + @deprecated
1.26 +*/
1.27 +
1.28 +#ifndef LBSHOSTSETTINGS_H_
1.29 +#define LBSHOSTSETTINGS_H_
1.30 +
1.31 +#include <e32std.h>
1.32 +#include <lbs/lbshostsettingsclasstypes.h>
1.33 +
1.34 +/**
1.35 + * The ID of the Central Repository store used by the Host Settings API
1.36 + */
1.37 +const TLbsHostStoreId KLbsHostSettingsSuplStoreId = {0x10285AA8};
1.38 +
1.39 +/**
1.40 + * The host settings creator UID used by the device provisioning plug-ins.
1.41 + * If host settings have this creator ID they can be used for network initiated location requests
1.42 + */
1.43 +const TLbsHostCreatorId KLbsHostSettingsDevProvCreatorId = {0x10285AA9};
1.44 +
1.45 +/**
1.46 + * A test host settings creator UID
1.47 + */
1.48 +const TLbsHostCreatorId KLbsHostSettingsTestCreatorId = {0x10285AAA};
1.49 +
1.50 +class CLbsHostSettingsStoreImpl;
1.51 +class MLbsHostSettingsStoreImpl;
1.52 +
1.53 +/**
1.54 +Interface that receives notification of changes to a host settings data store.
1.55 +A reference to an object of this class can be passed to CLbsHostSettingsStore::NewL()
1.56 +to register a client as a host settings data store observer.
1.57 +@see CLbsHostSettingsStore
1.58 +@publishedPartner
1.59 +@deprecated
1.60 +*/
1.61 +class MLbsHostSettingsStoreObserver
1.62 + {
1.63 +
1.64 +public:
1.65 + IMPORT_C virtual TVersion Version() const;
1.66 +
1.67 + /**
1.68 + Receive notification that the contents of the data store have changed.
1.69 +
1.70 + This method is called when a host settings entry in the data store been changed by
1.71 + another client session. It specifies the ID of the entry that has changed
1.72 + and also which store it belongs to.
1.73 +
1.74 + Note: An application will not receive notification updates to changes it
1.75 + itself has made to the same instance of CLbsHostSettingsStore.
1.76 +
1.77 + @param aError KErrNone if an entry has been changed, otherwise an
1.78 + error code from CenRep indicating a notification
1.79 + request failure.
1.80 + @param aStoreId Identifies which data store has been updated or
1.81 + incurred an error.
1.82 + @param aSettingsId Contains the ID of the host settings that has changed.
1.83 + Valid only when aError == KErrNone.
1.84 +
1.85 + */
1.86 + IMPORT_C virtual void LbsHostSettingsUpdated(TInt aError, TLbsHostStoreId aStoreId, TLbsHostSettingsId aSettingsId) const = 0;
1.87 +
1.88 +
1.89 +protected:
1.90 + IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2);
1.91 + };
1.92 +
1.93 +
1.94 +/**
1.95 +A class that encapsulates a host settings data store.
1.96 +
1.97 +A host settings data store contains settings that describe the server hosts that the LBS subsystem
1.98 +uses. For example, for the SUPL protocol, the data store contains settings for the SUPL servers that are used
1.99 +for location requests (from local client applications and from the network), settings that define the authentication
1.100 +type that should be used between client and server and the internet access point to use for network connections.
1.101 +This class has methods to create a new host settings store, to create, modify and delete host settings and set the host
1.102 +settings that should be used as defaults.
1.103 +@see MLbsHostSettingsStoreObserver
1.104 +@publishedPartner
1.105 +@deprecated
1.106 +*/
1.107 +class CLbsHostSettingsStore : public CBase
1.108 + {
1.109 +public:
1.110 + IMPORT_C static CLbsHostSettingsStore* NewL(TLbsHostStoreId aStoreId);
1.111 +
1.112 + IMPORT_C static CLbsHostSettingsStore* NewL(TLbsHostStoreId aStoreId, MLbsHostSettingsStoreObserver& aObserver);
1.113 +
1.114 +
1.115 + IMPORT_C TInt CreateHostSettings(const TLbsHostSettingsBase& aSettings, TLbsHostCreatorId aCreatorId, TLbsHostSettingsId& aSettingsId);
1.116 +
1.117 + IMPORT_C TInt UpdateHostSettings(TLbsHostSettingsId aSettingsId, const TLbsHostSettingsBase& aSettings);
1.118 +
1.119 + IMPORT_C TInt GetHostSettings(TLbsHostSettingsId aSettingsId, TLbsHostSettingsBase& aSettings) const;
1.120 +
1.121 +
1.122 + IMPORT_C TInt RewindHostSettings();
1.123 +
1.124 + IMPORT_C TInt GetNextHostSettings(TLbsHostSettingsBase& aSettings, TLbsHostSettingsId& aSettingsId);
1.125 +
1.126 + IMPORT_C TInt GetNextHostSettingsByCreator(TLbsHostCreatorId aCreatorId, TLbsHostSettingsBase& aSettings, TLbsHostSettingsId& aSettingsId);
1.127 +
1.128 +
1.129 + IMPORT_C TInt SetDefaultHostSettings(TLbsHostSettingsId aSettingsId);
1.130 +
1.131 + IMPORT_C TInt GetDefaultHostSettings(TLbsHostSettingsBase& aSettings) const;
1.132 +
1.133 + IMPORT_C TInt GetDefaultHostSettings(TLbsHostSettingsBase& aSettings, TLbsHostSettingsId& aSettingsId) const;
1.134 +
1.135 + IMPORT_C TInt DeleteHostSettings(TLbsHostSettingsId aSettingsId);
1.136 +
1.137 + IMPORT_C ~CLbsHostSettingsStore();
1.138 +
1.139 +protected:
1.140 + /**
1.141 + Default constructor for the settings store.
1.142 + */
1.143 + CLbsHostSettingsStore();
1.144 + void ConstructL(TLbsHostStoreId aStoreId, MLbsHostSettingsStoreObserver *aObserver);
1.145 +
1.146 +private:
1.147 + /**
1.148 + * In order to maintain two implementations behind one interface
1.149 + * we are holding two different versions of the implementation.
1.150 + * The pointer to the C class will only be used for instantiation
1.151 + * and destruction, we shall use the pointer to the mixin for
1.152 + * everything else.
1.153 + */
1.154 + CLbsHostSettingsStoreImpl* iImplementation;
1.155 + MLbsHostSettingsStoreImpl* iSettingsStore;
1.156 +
1.157 +private:
1.158 + };
1.159 +
1.160 +
1.161 +#endif // LBSHOSTSETTINGS_H_
1.162 +
1.163 +