Skip to content

Commit

Permalink
Minor modification to persistent storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-Chouteau committed Oct 27, 2015
1 parent edc4926 commit b758065
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pebble-binding/src/pebble-generic_persistent_storage.adb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ package body Pebble.Generic_Persistent_Storage is
end if;
end Write;

-----------
-- Write --
-----------

function Write (Data : Data_Type) return Boolean is
Success : Boolean;
begin
Write (Data, Success);
return Success;
end Write;

----------
-- Read --
----------
Expand All @@ -49,6 +60,17 @@ package body Pebble.Generic_Persistent_Storage is
end if;
end Read;

----------
-- Read --
----------

function Read (Data : out Data_Type) return Boolean is
Success : Boolean;
begin
Read (Data, Success);
return Success;
end Read;

------------
-- Exists --
------------
Expand Down
11 changes: 11 additions & 0 deletions pebble-binding/src/pebble-generic_persistent_storage.ads
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@ package Pebble.Generic_Persistent_Storage is
pragma Compile_Time_Error
(Data_Type'Size > Pebble.Storage.Data_Max_Length,
"Persistant data too big");

procedure Write (Data : Data_Type; Success : out Boolean);
function Write (Data : Data_Type) return Boolean;
-- Read data associated with the key, return True on success

procedure Read (Data : out Data_Type; Success : out Boolean);
function Read (Data : out Data_Type) return Boolean;
-- Read data associated with the key, return True on success

function Exists return Boolean;
-- Return True if there is data associated with the key

procedure Erase;
-- Erase data associated with the key

end Pebble.Generic_Persistent_Storage;

0 comments on commit b758065

Please sign in to comment.