Difference between revisions of "Truxton jurisdiction set description"

From truxwiki.com
Jump to navigation Jump to search
(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...")
 
 
Line 1: Line 1:
 
This sets the name of the jurisdiction.
 
This sets the name of the jurisdiction.
This corresponds to the <code>[Name]</code> column of the <code>[Jurisdiction]</code> table.
+
This corresponds to the <code>[Description]</code> column of the <code>[Jurisdiction]</code> table.
  
 
=Syntax=
 
=Syntax=
 
<source lang="C">
 
<source lang="C">
void truxton_jurisdiction_set_name( uint64_t jurisdiction_handle, char const * name );
+
void truxton_jurisdiction_set_description( uint64_t jurisdiction_handle, char const * description );
 
</source>
 
</source>
  
Line 11: Line 11:
 
This handle comes from calling <code>[[truxton_jurisdiction_create|truxton_jurisdiction_create()]]</code>.
 
This handle comes from calling <code>[[truxton_jurisdiction_create|truxton_jurisdiction_create()]]</code>.
  
==<code>name </code>==
+
==<code>description</code>==
The name of the jurisdiction.
+
A description of the jurisdiction.
  
 
=Sample=
 
=Sample=
<source lang="C" highlight="8">
+
<source lang="C" highlight="9">
 
void create_jurisdiction( void )
 
void create_jurisdiction( void )
 
{
 
{

Latest revision as of 16:04, 18 February 2021

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

Syntax

void truxton_jurisdiction_set_description( uint64_t jurisdiction_handle, char const * description );

Parameters

jurisdiction_handle

This handle comes from calling truxton_jurisdiction_create().

description

A description 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 );
}