Truxton jurisdiction set description

From truxwiki.com
Revision as of 15:54, 18 February 2021 by Sam (talk | contribs) (Created page with "This sets the name of the jurisdiction. This corresponds to the <code>[Name]</code> column of the <code>[Jurisdiction]</code> table. =Syntax= <source lang="C"> void truxton_j...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This sets the name of the jurisdiction. This corresponds to the [Name] column of the [Jurisdiction] table.

Syntax

void truxton_jurisdiction_set_name( uint64_t jurisdiction_handle, char const * name );

Parameters

jurisdiction_handle

This handle comes from calling truxton_jurisdiction_create().

name

The name of the jurisdiction.

Sample

void create_jurisdiction( void )
{
   uint64_t truxton = truxton_create();

   uint64_t jurisdiction = truxton_jurisdiction_create( truxton );

   truxton_jurisdiction_set_id( jurisdiction, 1234567 );
   truxton_jurisdiction_set_name( jurisdiction, "Rubicon" );
   truxton_jurisdiction_set_description( jurisdiction, "Will Travers is the POC" );

   if ( truxton_jurisdiction_save( jurisdiction ) == 0 )
   {
      printf( "Cannot save jurisdiction to the database.\n" );
   }

   truxton_jurisdiction_destroy( jurisdiction );
   truxton_destroy( truxton );
}