Fix inconsistencies in auto generated bindings

Description

First, rebase PR https://github.com/maidsafe/safe_client_libs/pull/615 on top of the master branch in SAFE Client Libs.

The inconsistencies in the auto generated bindings must be addressed,

SafeApp.AppBindings/AppBindings.Manual.cs

  • The Uint has a typo in the attribute definitions. It should be UInt. Example, [MonoPInvokeCallback(typeof(UintAuthGrantedCb))] should be [MonoPInvokeCallback(typeof(UIntAuthGrantedCb))]

  • UintAuthGrantedNativeCb is not a valid type. Should be UintAuthGrantedCb

SafeApp.AppBindings/AppBindings.cs

  • MDataEntriesForEachNative function is not used. Can be removed.

SafeApp.Utilities/AppTypes.cs

  • Add attribute [assembly: InternalsVisibleTo("SafeApp.MockAuthBindings")]

SafeApp.Utilities/AppTypes.Manual.cs

  • Add [PublicApi] attribute for the types

  • Add using JetBrains.Annotations;

  • Remove using System.Runtime.InteropServices;

SafeApp.Utilities/IAppBindings.cs

  • Remove using System.Runtime.InteropServices;

SafeApp.Utilities/BindingUtils.cs

  • Change int to var in for loop

  • Add validation if len = 0 in CopyToByteArray(). Null pointer can be returned if the value is deleted in a MutableData
    ```

Manual files for Authenticator are not generated. The manual files can be used from AuthBinding.Manual.cs and IAuthBindings.Manual.cs

Environment

None

Gliffy Diagrams

Activity

Adam Cigánek April 2, 2018 at 12:32 PM

So far addressed all the points except the last one (manual files for safe authenticator).

Nikita Baksalyar March 14, 2018 at 2:50 PM

Updated story points from 2 to 4 because the Adam's bindgen branch might need to be rebased on top of latest master in SAFE Client Libs (i.e. PR https://github.com/maidsafe/safe_client_libs/pull/615 needs to be updated).

Done

Details

Assignee

Reporter

Start date

End date

Story Points

Components

Priority

Created March 2, 2018 at 8:17 AM
Updated August 27, 2018 at 4:32 PM
Resolved June 4, 2018 at 12:49 PM