networkprotocolmodules/common/asn1supl/inc/SUPL-AUTH-RESP.h
branchRCL_3
changeset 65 a796fdeeb33c
parent 0 9cfd9a3ee49c
equal deleted inserted replaced
58:87622fad6b51 65:a796fdeeb33c
       
     1 // Copyright (c) 2001-2009 Objective Systems, Inc. (http://www.obj-sys.com) 
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available 
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 
       
     9 /**
       
    10  * This file was generated by the Objective Systems ASN1C Compiler
       
    11  * (http://www.obj-sys.com).
       
    12  */
       
    13 #ifndef SUPL_AUTH_RESP_H
       
    14 #define SUPL_AUTH_RESP_H
       
    15 
       
    16 #include <stdio.h>
       
    17 #include <stdlib.h>
       
    18 #include "rtkey.h"
       
    19 #include "rtpersrc/asn1PerCppTypes.h"
       
    20 #include "ASN1CBitStr.h"
       
    21 #include "ULP-Components.h"
       
    22 
       
    23 /**
       
    24  * Header file for ASN.1 module SUPL-AUTH-RESP
       
    25  */
       
    26 /**************************************************************/
       
    27 /*                                                            */
       
    28 /*  SPCAuthKey_shortKey                                       */
       
    29 /*                                                            */
       
    30 /**************************************************************/
       
    31 
       
    32 #define TV_SPCAuthKey_shortKey	(TM_UNIV|TM_PRIM|3)
       
    33 
       
    34 struct ASN1T_SPCAuthKey_shortKey {
       
    35    OSUINT32  numbits;
       
    36    OSOCTET data[16];
       
    37    // ctors
       
    38    ASN1T_SPCAuthKey_shortKey () : numbits(0) {}
       
    39    ASN1T_SPCAuthKey_shortKey (OSUINT32 _numbits, const OSOCTET* _data) :
       
    40       numbits(_numbits) {
       
    41       OSCRTLMEMCPY (data, _data, sizeof(data));
       
    42    }
       
    43 } ;
       
    44 
       
    45 IMPORT_C int asn1PE_SPCAuthKey_shortKey (OSCTXT* pctxt, ASN1T_SPCAuthKey_shortKey* pvalue);
       
    46 
       
    47 IMPORT_C int asn1PD_SPCAuthKey_shortKey (OSCTXT* pctxt, ASN1T_SPCAuthKey_shortKey* pvalue);
       
    48 
       
    49 IMPORT_C void asn1Print_SPCAuthKey_shortKey
       
    50    (const char* name, ASN1T_SPCAuthKey_shortKey* pvalue);
       
    51 
       
    52 /**************************************************************/
       
    53 /*                                                            */
       
    54 /*  SPCAuthKey_longKey                                        */
       
    55 /*                                                            */
       
    56 /**************************************************************/
       
    57 
       
    58 #define TV_SPCAuthKey_longKey	(TM_UNIV|TM_PRIM|3)
       
    59 
       
    60 struct ASN1T_SPCAuthKey_longKey {
       
    61    OSUINT32  numbits;
       
    62    OSOCTET data[32];
       
    63    // ctors
       
    64    ASN1T_SPCAuthKey_longKey () : numbits(0) {}
       
    65    ASN1T_SPCAuthKey_longKey (OSUINT32 _numbits, const OSOCTET* _data) :
       
    66       numbits(_numbits) {
       
    67       OSCRTLMEMCPY (data, _data, sizeof(data));
       
    68    }
       
    69 } ;
       
    70 
       
    71 IMPORT_C int asn1PE_SPCAuthKey_longKey (OSCTXT* pctxt, ASN1T_SPCAuthKey_longKey* pvalue);
       
    72 
       
    73 IMPORT_C int asn1PD_SPCAuthKey_longKey (OSCTXT* pctxt, ASN1T_SPCAuthKey_longKey* pvalue);
       
    74 
       
    75 IMPORT_C void asn1Print_SPCAuthKey_longKey
       
    76    (const char* name, ASN1T_SPCAuthKey_longKey* pvalue);
       
    77 
       
    78 /**************************************************************/
       
    79 /*                                                            */
       
    80 /*  SPCAuthKey                                                */
       
    81 /*                                                            */
       
    82 /**************************************************************/
       
    83 
       
    84 /* Choice tag constants */
       
    85 
       
    86 #define T_SPCAuthKey_shortKey           1
       
    87 #define T_SPCAuthKey_longKey            2
       
    88 #define T_SPCAuthKey_extElem1           3
       
    89 
       
    90 struct ASN1T_SPCAuthKey {
       
    91    int t;
       
    92    union {
       
    93       /* t = 1 */
       
    94       ASN1T_SPCAuthKey_shortKey *shortKey;
       
    95       /* t = 2 */
       
    96       ASN1T_SPCAuthKey_longKey *longKey;
       
    97       /* t = 3 */
       
    98    } u;
       
    99 } ;
       
   100 
       
   101 IMPORT_C int asn1PE_SPCAuthKey (OSCTXT* pctxt, ASN1T_SPCAuthKey* pvalue);
       
   102 
       
   103 IMPORT_C int asn1PD_SPCAuthKey (OSCTXT* pctxt, ASN1T_SPCAuthKey* pvalue);
       
   104 
       
   105 IMPORT_C void asn1Print_SPCAuthKey
       
   106    (const char* name, ASN1T_SPCAuthKey* pvalue);
       
   107 
       
   108 IMPORT_C void asn1Free_SPCAuthKey (OSCTXT *pctxt, ASN1T_SPCAuthKey* pvalue);
       
   109 
       
   110 /**************************************************************/
       
   111 /*                                                            */
       
   112 /*  KeyIdentity3                                              */
       
   113 /*                                                            */
       
   114 /**************************************************************/
       
   115 
       
   116 #define TV_KeyIdentity3	(TM_UNIV|TM_PRIM|3)
       
   117 
       
   118 struct ASN1T_KeyIdentity3 {
       
   119    OSUINT32  numbits;
       
   120    OSOCTET data[16];
       
   121    // ctors
       
   122    ASN1T_KeyIdentity3 () : numbits(0) {}
       
   123    ASN1T_KeyIdentity3 (OSUINT32 _numbits, const OSOCTET* _data) :
       
   124       numbits(_numbits) {
       
   125       OSCRTLMEMCPY (data, _data, sizeof(data));
       
   126    }
       
   127 } ;
       
   128 
       
   129 IMPORT_C int asn1PE_KeyIdentity3 (OSCTXT* pctxt, ASN1T_KeyIdentity3* pvalue);
       
   130 
       
   131 IMPORT_C int asn1PD_KeyIdentity3 (OSCTXT* pctxt, ASN1T_KeyIdentity3* pvalue);
       
   132 
       
   133 IMPORT_C void asn1Print_KeyIdentity3
       
   134    (const char* name, ASN1T_KeyIdentity3* pvalue);
       
   135 
       
   136 /**************************************************************/
       
   137 /*                                                            */
       
   138 /*  SUPLAUTHRESP                                              */
       
   139 /*                                                            */
       
   140 /**************************************************************/
       
   141 
       
   142 #define TV_SUPLAUTHRESP	(TM_UNIV|TM_CONS|16)
       
   143 
       
   144 struct ASN1T_SUPLAUTHRESP {
       
   145    struct {
       
   146       unsigned sPCAuthKeyPresent : 1;
       
   147       unsigned keyIdentity3Present : 1;
       
   148       unsigned statusCodePresent : 1;
       
   149    } m;
       
   150    ASN1T_SPCAuthKey sPCAuthKey;
       
   151    ASN1T_KeyIdentity3 keyIdentity3;
       
   152    ASN1T_StatusCode statusCode;
       
   153    IMPORT_C ASN1T_SUPLAUTHRESP ();
       
   154 } ;
       
   155 
       
   156 IMPORT_C int asn1PE_SUPLAUTHRESP (OSCTXT* pctxt, ASN1T_SUPLAUTHRESP* pvalue);
       
   157 
       
   158 IMPORT_C int asn1PD_SUPLAUTHRESP (OSCTXT* pctxt, ASN1T_SUPLAUTHRESP* pvalue);
       
   159 
       
   160 IMPORT_C void asn1Print_SUPLAUTHRESP
       
   161    (const char* name, ASN1T_SUPLAUTHRESP* pvalue);
       
   162 
       
   163 IMPORT_C void asn1Free_SUPLAUTHRESP (OSCTXT *pctxt, ASN1T_SUPLAUTHRESP* pvalue);
       
   164 
       
   165 #endif