project for eddystone

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_URIBeacon by Bluetooth Low Energy

Committer:
sunsmile2015
Date:
Mon Nov 02 10:14:48 2015 +0000
Revision:
29:db32d8dae04c
Parent:
26:a2396234b4a8
tested

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rgrover1 16:1daa78939a3b 1 /* mbed Microcontroller Library
rgrover1 16:1daa78939a3b 2 * Copyright (c) 2006-2015 ARM Limited
rgrover1 16:1daa78939a3b 3 *
rgrover1 16:1daa78939a3b 4 * Licensed under the Apache License, Version 2.0 (the "License");
rgrover1 16:1daa78939a3b 5 * you may not use this file except in compliance with the License.
rgrover1 16:1daa78939a3b 6 * You may obtain a copy of the License at
rgrover1 16:1daa78939a3b 7 *
rgrover1 16:1daa78939a3b 8 * http://www.apache.org/licenses/LICENSE-2.0
rgrover1 16:1daa78939a3b 9 *
rgrover1 16:1daa78939a3b 10 * Unless required by applicable law or agreed to in writing, software
rgrover1 16:1daa78939a3b 11 * distributed under the License is distributed on an "AS IS" BASIS,
rgrover1 16:1daa78939a3b 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rgrover1 16:1daa78939a3b 13 * See the License for the specific language governing permissions and
rgrover1 16:1daa78939a3b 14 * limitations under the License.
rgrover1 16:1daa78939a3b 15 */
rgrover1 16:1daa78939a3b 16
rgrover1 16:1daa78939a3b 17 #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__
rgrover1 16:1daa78939a3b 18 #define __BLE_CONFIG_PARAMS_PERSISTENCE_H__
rgrover1 16:1daa78939a3b 19
rgrover1 26:a2396234b4a8 20 #include "ble/services/URIBeaconConfigService.h"
rgrover1 16:1daa78939a3b 21
rgrover1 16:1daa78939a3b 22 /**
rgrover1 16:1daa78939a3b 23 * Generic API to load the URIBeacon configuration parameters from persistent
rgrover1 16:1daa78939a3b 24 * storage. If persistent storage isn't available, the persistenceSignature
rgrover1 16:1daa78939a3b 25 * member of params may be left un-initialized to the MAGIC, and this will cause
rgrover1 16:1daa78939a3b 26 * a reset to default values.
rgrover1 16:1daa78939a3b 27 *
rgrover1 16:1daa78939a3b 28 * @param[out] paramsP
rgrover1 17:e2c0a1696e39 29 * The parameters to be filled in from persistence storage. This
rgrover1 17:e2c0a1696e39 30 argument can be NULL if the caller is only interested in
rgrover1 17:e2c0a1696e39 31 discovering the persistence status of params.
rgrover1 17:e2c0a1696e39 32
rgrover1 17:e2c0a1696e39 33 * @return true if params were loaded from persistent storage and have usefully
rgrover1 17:e2c0a1696e39 34 * initialized fields.
rgrover1 16:1daa78939a3b 35 */
rgrover1 17:e2c0a1696e39 36 bool loadURIBeaconConfigParams(URIBeaconConfigService::Params_t *paramsP);
rgrover1 16:1daa78939a3b 37
rgrover1 16:1daa78939a3b 38 /**
rgrover1 16:1daa78939a3b 39 * Generic API to store the URIBeacon configuration parameters to persistent
rgrover1 16:1daa78939a3b 40 * storage. It typically initializes the persistenceSignature member of the
rgrover1 16:1daa78939a3b 41 * params to the MAGIC value to indicate persistence.
rgrover1 16:1daa78939a3b 42 *
rgrover1 17:e2c0a1696e39 43 * @note: the save operation may be asynchronous. It may be a short while before
rgrover1 17:e2c0a1696e39 44 * the request takes affect. Reading back saved configParams may not yield
rgrover1 17:e2c0a1696e39 45 * correct behaviour if attempted soon after a store.
rgrover1 17:e2c0a1696e39 46 *
rgrover1 16:1daa78939a3b 47 * @param[in/out] paramsP
rgrover1 16:1daa78939a3b 48 * The params to be saved; persistenceSignature member gets
rgrover1 16:1daa78939a3b 49 * updated if persistence is successful.
rgrover1 16:1daa78939a3b 50 */
rgrover1 17:e2c0a1696e39 51 void saveURIBeaconConfigParams(const URIBeaconConfigService::Params_t *paramsP);
rgrover1 16:1daa78939a3b 52
rgrover1 16:1daa78939a3b 53 #endif /* #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__*/