.. _naming_conventions:

==================
Naming conventions
==================

This SDK documentation uses generic naming conventions for clarity across multiple languages and platforms. Developers must adapt these generic names to follow their programming language's specific conventions.

Below are illustrative examples demonstrating the mapping from generic documentation to language-specific code:

Generic documentation
-----------------------

.. code:: Dart

    License.activateBuffer
    VerificationResult.caCertificateVerified
    LicenseError.invalidLicense

Language-specific implementations
---------------------------------

.. tab-set::

    .. tab-item:: Python
        :sync: Python
   
        This SDK complies with the `PEP 8 recommendations <https://peps.python.org/pep-0008/>`_.

        - Class, struct and enumeration names are written in ``PascalCase``.
        - Class and struct member names are written in ``snake_case``.
        - Enumeration fields are written in ``UPPER_CASE_WITH_UNDERSCORE``.

        **Examples:**

        .. code:: Java

            License.activate_buffer
            VerificationResult.ca_certificate_verified
            LicenseError.INVALID_LICENSE

    .. tab-item:: Dart
        :sync: Dart
   
        - Class, struct and enumeration names are written in ``PascalCase``.
        - Class and struct member names are written in ``lowerCamelCase``.
        - Enumeration fields are written in ``lowerCamelCase``.

        **Examples:**
      
        .. code:: Java
        
            License.activateBuffer
            VerificationResult.caCertificateVerified
            LicenseError.invalidLicense

    .. tab-item:: C#
        :sync: C#

        - Class, struct and enumeration names are written in ``PascalCase``.
        - Class and struct member names are written in ``PascalCase``.
        - Enumeration fields are written in ``PascalCase``.

        .. code:: Java

            License.ActivateBuffer
            VerificationResult.CaCertificateVerified
            LicenseError.InvalidLicense

    .. tab-item:: Java
        :sync: Java

        - Class, struct and enumeration names are written in ``PascalCase``.
        - Class and struct member names are written in ``lowerCamelCase``.
        - Enumeration fields are written in ``UPPER_CASE_WITH_UNDERSCORE``.

        .. code:: Java

            License.activateBuffer
            VerificationResult.caCertificateVerified
            LicenseError.INVALID_LICENSE

    .. tab-item:: Kotlin
        :sync: Kotlin

        - Class, struct and enumeration names are written in ``PascalCase``.
        - Class and struct member names are written in ``lowerCamelCase``.
        - Enumeration fields are written in ``UPPER_CASE_WITH_UNDERSCORE``.

        .. code:: Kotlin

            License.activateBuffer
            VerificationResult.caCertificateVerified
            LicenseError.INVALID_LICENSE

    .. tab-item:: Swift
        :sync: Swift

        - Class, struct and enumeration names are written in ``PascalCase``.
        - Class and struct member names are written in ``lowerCamelCase``.
        - Enumeration fields are written in ``lowerCamelCase``.

        .. code:: Swift

            License.activateBuffer
            VerificationResult.caCertificateVerified
            LicenseError.invalidLicense

    .. tab-item:: C
        :sync: C

        .. code:: C

            id3License_ActivateBuffer
            id3VerificationResult.CaCertificateVerified
            id3LicenseError_InvalidLicense

        .. note:: 
        
            The C API implements pseudo object-oriented programming concepts where the object is passed explicitly to a member function as first parameter.


