Geofence3 / src /

data.c

  1. /*
  2. * Copyright (c) 2016 Samsung Electronics Co., Ltd
  3. *
  4. * Licensed under the Flora License, Version 1.1 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://floralicense.org/license/
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16.  
  17. #include "data.h"
  18.  
  19. /**
  20. * @brief Initialization function for data module.
  21. */
  22. void data_initialize(appdata_s *ad)
  23. {
  24. /*
  25. * Initialize application data.
  26. */
  27. int i = 0;
  28.  
  29. for (i = 0; i < MAX_COUNT; i++) {
  30. ad->place_id[i] = -1;
  31. ad->fence_id[i] = -1;
  32. }
  33. ad->geo_manager = NULL;
  34. }
  35.  
  36. /**
  37. * @brief Finalization function for data module.
  38. */
  39. void data_finalize(appdata_s *ad)
  40. {
  41. /*
  42. * If you need to finalize application data,
  43. * please use this function.
  44. */
  45. ad->geo_manager = NULL;
  46. }