networkprotocolmodules/common/asn1supl/inc/ULP.h
branchGCC_SURGE
changeset 49 5f20f71a57a3
parent 41 ec40843d536a
parent 45 15a2125aa2f3
equal deleted inserted replaced
41:ec40843d536a 49:5f20f71a57a3
     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 ULP_H
       
    14 #define ULP_H
       
    15 
       
    16 #include <stdio.h>
       
    17 #include <stdlib.h>
       
    18 #include "rtkey.h"
       
    19 #include "rtpersrc/asn1PerCppTypes.h"
       
    20 #include "ULP-Components.h"
       
    21 #include "SUPL-INIT.h"
       
    22 #include "SUPL-START.h"
       
    23 #include "SUPL-RESPONSE.h"
       
    24 #include "SUPL-POS-INIT.h"
       
    25 #include "SUPL-POS.h"
       
    26 #include "SUPL-END.h"
       
    27 #include "SUPL-AUTH-REQ.h"
       
    28 #include "SUPL-AUTH-RESP.h"
       
    29 
       
    30 /**
       
    31  * Header file for ASN.1 module ULP
       
    32  */
       
    33 /**************************************************************/
       
    34 /*                                                            */
       
    35 /*  UlpMessage                                                */
       
    36 /*                                                            */
       
    37 /**************************************************************/
       
    38 
       
    39 /* Choice tag constants */
       
    40 
       
    41 #define T_UlpMessage_msSUPLINIT         1
       
    42 #define T_UlpMessage_msSUPLSTART        2
       
    43 #define T_UlpMessage_msSUPLRESPONSE     3
       
    44 #define T_UlpMessage_msSUPLPOSINIT      4
       
    45 #define T_UlpMessage_msSUPLPOS          5
       
    46 #define T_UlpMessage_msSUPLEND          6
       
    47 #define T_UlpMessage_msSUPLAUTHREQ      7
       
    48 #define T_UlpMessage_msSUPLAUTHRESP     8
       
    49 #define T_UlpMessage_extElem1           9
       
    50 
       
    51 struct ASN1T_UlpMessage {
       
    52    int t;
       
    53    union {
       
    54       /* t = 1 */
       
    55       ASN1T_SUPLINIT *msSUPLINIT;
       
    56       /* t = 2 */
       
    57       ASN1T_SUPLSTART *msSUPLSTART;
       
    58       /* t = 3 */
       
    59       ASN1T_SUPLRESPONSE *msSUPLRESPONSE;
       
    60       /* t = 4 */
       
    61       ASN1T_SUPLPOSINIT *msSUPLPOSINIT;
       
    62       /* t = 5 */
       
    63       ASN1T_SUPLPOS *msSUPLPOS;
       
    64       /* t = 6 */
       
    65       ASN1T_SUPLEND *msSUPLEND;
       
    66       /* t = 7 */
       
    67       ASN1T_SUPLAUTHREQ *msSUPLAUTHREQ;
       
    68       /* t = 8 */
       
    69       ASN1T_SUPLAUTHRESP *msSUPLAUTHRESP;
       
    70       /* t = 9 */
       
    71    } u;
       
    72 } ;
       
    73 
       
    74 IMPORT_C int asn1PE_UlpMessage (OSCTXT* pctxt, ASN1T_UlpMessage* pvalue);
       
    75 
       
    76 IMPORT_C int asn1PD_UlpMessage (OSCTXT* pctxt, ASN1T_UlpMessage* pvalue);
       
    77 
       
    78 EXTERN void asn1Print_UlpMessage
       
    79    (const char* name, ASN1T_UlpMessage* pvalue);
       
    80 
       
    81 IMPORT_C void asn1Free_UlpMessage (OSCTXT *pctxt, ASN1T_UlpMessage* pvalue);
       
    82 
       
    83 /**************************************************************/
       
    84 /*                                                            */
       
    85 /*  ULP_PDU                                                   */
       
    86 /*                                                            */
       
    87 /**************************************************************/
       
    88 
       
    89 #define TV_ULP_PDU	(TM_UNIV|TM_CONS|16)
       
    90 
       
    91 struct ASN1T_ULP_PDU : public ASN1TPDU {
       
    92    OSUINT16 length;
       
    93    ASN1T_Version version;
       
    94    ASN1T_SessionID sessionID;
       
    95    ASN1T_UlpMessage message;
       
    96    IMPORT_C ASN1T_ULP_PDU ();
       
    97    IMPORT_C ~ASN1T_ULP_PDU ();
       
    98 } ;
       
    99 
       
   100 class ASN1C_ULP_PDU :
       
   101 public ASN1CType
       
   102 {
       
   103 protected:
       
   104    ASN1T_ULP_PDU& msgData;
       
   105 public:
       
   106    IMPORT_C ASN1C_ULP_PDU (ASN1T_ULP_PDU& data);
       
   107    IMPORT_C ASN1C_ULP_PDU (OSRTMessageBufferIF& msgBuf, ASN1T_ULP_PDU& data);
       
   108    IMPORT_C ASN1C_ULP_PDU (OSRTContext &context, ASN1T_ULP_PDU& data);
       
   109 
       
   110    inline ASN1T_ULP_PDU& getData () { return msgData; }
       
   111    inline const ASN1T_ULP_PDU& getData () const { return msgData; }
       
   112 
       
   113    // standard encode/decode methods (defined in ASN1CType base class):
       
   114    // int Encode ();
       
   115    // int Decode ();
       
   116 
       
   117    // stream encode/decode methods:
       
   118    IMPORT_C int EncodeTo (OSRTMessageBufferIF& msgBuf);
       
   119    IMPORT_C int DecodeFrom (OSRTMessageBufferIF& msgBuf);
       
   120 
       
   121    EXTERN void Print ();
       
   122 } ;
       
   123 
       
   124 IMPORT_C int asn1PE_ULP_PDU (OSCTXT* pctxt, ASN1T_ULP_PDU* pvalue);
       
   125 
       
   126 IMPORT_C int asn1PD_ULP_PDU (OSCTXT* pctxt, ASN1T_ULP_PDU* pvalue);
       
   127 
       
   128 EXTERN void asn1Print_ULP_PDU
       
   129    (const char* name, ASN1T_ULP_PDU* pvalue);
       
   130 
       
   131 IMPORT_C void asn1Free_ULP_PDU (OSCTXT *pctxt, ASN1T_ULP_PDU* pvalue);
       
   132 
       
   133 #endif