trust_token.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 #ifndef TRUST_TOKEN_H
00018 #define TRUST_TOKEN_H
00019 
00025 #include <axiom.h>
00026 #include <axutil_utils.h>
00027 #include <trust_constants.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033     /* Security token states. */
00034     typedef enum {
00035         ISSUED = 1,
00036         EXPIRED,
00037         CANCELED,
00038         RENEWED
00039     }trust_token_state_t;
00040 
00041     typedef struct trust_token trust_token_t;
00042 
00051     AXIS2_EXTERN trust_token_t* AXIS2_CALL
00052     trust_token_create(
00053         const axutil_env_t *env,
00054         axis2_char_t *id,
00055         axiom_node_t *token_node,
00056         axiom_node_t *life_node);
00057 
00067     AXIS2_EXTERN trust_token_t* AXIS2_CALL 
00068     trust_token_create_with_dates(
00069         const axutil_env_t *env,
00070         axis2_char_t *id,
00071         axiom_node_t *token_node,
00072         axutil_date_time_t *created,
00073         axutil_date_time_t *expire);
00074 
00087     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00088     trust_token_process_life_elem(
00089         const axutil_env_t *env,
00090         axiom_node_t *life_node,
00091         trust_token_t *token);
00092 
00099     AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
00100     trust_token_is_changed(
00101         const axutil_env_t *env,
00102         trust_token_t *token);
00103 
00111     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00112     trust_token_set_changed(
00113         const axutil_env_t *env,
00114         trust_token_t *token,
00115         axis2_bool_t changed);
00116 
00123     AXIS2_EXTERN trust_token_state_t AXIS2_CALL 
00124     trust_token_get_state(
00125         const axutil_env_t *env,
00126         trust_token_t *token);
00127 
00135     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00136     trust_token_set_state(
00137         const axutil_env_t *env,
00138         trust_token_t *token,
00139         trust_token_state_t state);
00140 
00147     AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
00148     trust_token_get_token(
00149         const axutil_env_t *env,
00150         trust_token_t *token);
00151 
00159     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00160     trust_token_set_token(
00161         const axutil_env_t *env,
00162         trust_token_t *token,
00163         axiom_node_t *token_node);
00164 
00171     AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
00172     trust_token_get_id(
00173         const axutil_env_t *env,
00174         trust_token_t *token);
00175 
00182     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
00183     trust_token_get_previous_token(
00184         const axutil_env_t *env,
00185         trust_token_t *token);
00186 
00194     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00195     trust_token_set_previous_token(
00196         const axutil_env_t *env,
00197         trust_token_t *token,
00198         axiom_node_t *prev_token);
00199 
00200     /* **
00201      * @return Returns the secret.
00202 
00203      public byte[] getSecret() {
00204      return secret;
00205      } */
00206 
00220     AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
00221     trust_token_get_attached_reference(
00222         const axutil_env_t *env, 
00223         trust_token_t *token);
00224 
00232     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00233     trust_token_set_attached_reference(
00234         const axutil_env_t *env,
00235         trust_token_t *token,
00236         axiom_node_t *attached_reference);
00237 
00244     AXIS2_EXTERN axiom_node_t* AXIS2_CALL 
00245     trust_token_get_unattached_reference(
00246         const axutil_env_t *env,
00247         trust_token_t *token);
00248 
00256     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00257     trust_token_set_unattached_reference(
00258         const axutil_env_t *env,
00259         trust_token_t *token,
00260         axiom_node_t *unattached_reference);
00261 
00268     AXIS2_EXTERN axutil_date_time_t* AXIS2_CALL 
00269     trust_token_get_created(
00270         const axutil_env_t *env,
00271         trust_token_t *token);
00272 
00280     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00281     trust_token_set_created(
00282         const axutil_env_t *env,
00283         trust_token_t *token,
00284         axutil_date_time_t *created);
00285 
00292     AXIS2_EXTERN axutil_date_time_t* AXIS2_CALL 
00293     trust_token_get_expires(
00294         const axutil_env_t *env,
00295         trust_token_t *token);
00296 
00304     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00305     trust_token_set_expires(
00306         const axutil_env_t *env,
00307         trust_token_t *token,
00308         axutil_date_time_t *expire);
00309 
00316     AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
00317     trust_token_get_issuer_address(
00318         const axutil_env_t *env,
00319         trust_token_t *token);
00320 
00328     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00329     trust_token_set_issuer_address(
00330         const axutil_env_t *env,
00331         trust_token_t *token,
00332         axis2_char_t *issuer_address);
00333 
00334     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00335     trust_token_process_life_elem(
00336         const axutil_env_t *env,
00337         axiom_node_t *life_node,
00338         trust_token_t *token);
00339         
00340 
00341 #ifdef __cplusplus
00342 }
00343 #endif
00344 
00345 #endif   /*TRUST_TOKEN_H*/
00346 

Generated on Wed Oct 14 01:02:16 2009 for Rampart/C by  doxygen 1.5.7.1