Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

tie/tie.h

Go to the documentation of this file.
00001 /*==============================================================================
00002                 Copyright (c) 2006 UGS
00003                 Unpublished - All Rights Reserved
00004  ==============================================================================*/
00005 
00012 #ifndef TIE_H
00013 #define TIE_H
00014 
00015 #include <tccore/tctype.h>
00016 #include <pie/pie.h>
00017 #include <tc/tc_startup.h>
00018 #include <tccore/workspaceobject.h>
00019 #include <tie/tie_errors.h>
00020 
00021 #include <tie/libtie_exports.h>
00022 
00044 //From 0 to 99 General status flags
00045 //From 100 to 199 TIE Export status flags
00046 //From 200 to 299 TIE Import status flags
00047 //From 300 to 399 PIE Export status flags ---- future
00048 //From 400 to 499 PIE Import status flags ---- future
00049 
00050 /**************************************************************
00051  * NOTE:
00052  * -----------------------------------------------------------
00053  * If new status is added make sure to add it in
00054  * TIE___addProcessedObjectToLog method. Also be careful while
00055  * adding the numbers. It should be in sequence.
00056  **************************************************************/
00057 typedef enum Object_status_in_map_e
00058 {
00059     /**************************************************************
00060     * NOTE:
00061     * If new status is added, make sure to add it in the end of this list.
00062     * Update the new status in TIE___addProcessedObjectToLog() method also.
00063     **************************************************************/
00064     TIE_NOCOMMENT         = 0,
00065     TIE_NEW                  ,
00066     TIE_UPDATE               ,
00067     TIE_DELETE               ,
00068     TIE_FAILED               ,
00069     TIE_SKIPPED              ,
00070     TIE_REPLACED             ,
00071     TIE_STUBBED              ,
00072     TIE_OWNPASSED            ,
00073     TIE_OWNFAILED            ,
00074     TIE_DELETEFAILED         ,
00075     TIE_CHECKINFAILED        ,
00076     TIE_NOTOWNCHECKOUT       ,
00077     TIE_ROLLINGBACK          ,
00078     TIE_UNPROCESSED          ,
00079     TIE_INITIALIZED          ,
00080     TIE_NEWUNPROCESSED       ,
00081     TIE_PREPROCESSED         ,
00082     TIE_UPDATEUNPROCESSED    ,
00083     TIE_NEWTOBEPROCESSED     ,
00084     TIE_UPDATETOBEPROCESSED ,
00085     TIE_REPLACESTUBWITHNEW  ,
00086     TIE_UPDATEWITHSITECO    ,
00087     TIE_UPDATEWITHOWNERSHIPCHANGE ,
00088     TIE_OCCDELETE         ,
00089     TIE_GRMDELETE         ,
00090     TIE_ITEMREVDELETE     ,
00091     TIE_NAMEDREFDELETE    ,
00092     TIE_DUPLICATEGSID     ,
00093     TIE_OBJECTCREATEDASHELPER,
00094     TIE_COEOWNFAILED,
00095     PRIMARY_FAILED,
00096     TIE_NAMEDREFREPLACED,
00097     TIE_UNMANAGED_SKIP,
00098     TIE_UNMANAGED_NEW,
00099     TIE_UNMANAGED_UPDATE,
00100     TIE_UNMANAGED_UNKNOWN
00101 } Object_status_in_map_t;
00102 
00106 typedef enum Scope_rules_import_mode_e
00107 {
00108     UNDEFINED_MODE = 0,
00109     IGNORE_MODE    = 1,     //Ignores already existing scope rules during import
00110     OVERWRITE_MODE = 2,     //Overwrites already existing scope rules during import
00111     APPEND_MODE = 3         //Appends clauses to already existing closure rules during import
00112 } Scope_rules_import_mode_t;
00113 
00117 typedef struct TIE_output_data_s
00118 {
00119     char *xmlFilePath;
00120     char *importexport_log_fmsticket;              /* FMS Ticket of log file */
00121     char *failedobjects_fmsticket;                 /* FMS Ticket of failed objects xml file used*/
00122                                                    /* Used for importer only. For exporter this */
00123                                                    /* field is null */
00124     int    nRootObjs;
00125     tag_t* rootObjs;
00126     int    nNewObjs;
00127     tag_t* newObjs;
00128     int    nUpdatedObjs;
00129     tag_t* updatedObjs;
00130     int    nDeletedObjsGSIdentities;
00131     char** deletedObjsGSIdentities;
00132 }TIE_output_data_t;
00133 
00134 // Below structure can hold a generic name-value pair of
00135 // strings
00136 typedef struct TIE_option_values_s
00137 {
00138     char *name;
00139     char *value;
00140 } TIE_option_value_t;
00141 
00142 typedef struct TIE_transfer_formula_s
00143 {
00144     char *optionSetName;               /* Name of optionset */
00145     char *optionSetUid;                /* UID of optionset or null */
00146     int  n_options;                    /* Number of options */
00147     TIE_option_value_t *optionOverrides; /* Reference to the option overrides structure*/
00148     int  n_sessOptions;                /* Number of session options */
00149     TIE_option_value_t *sessionOptions;  /* Reference to the session options structure*/
00150     char *transferModeName;            /* Name of Transfermode */
00151     char *transferModeUid;             /* UID of Transfermode or null */
00152     char *logFileName;               /* File name for log output or null */
00153     char *logFilePath;               /* File path for log output or null */
00154     char   *xsltFMSTicket;             /* FMS File ticket for xslt file    */
00155     char *reason;                      /* Reason string */
00156 } TIE_transfer_formula_t;
00157 
00158 typedef struct ownershipChange_s
00159 {
00160     int    destinationSiteId;     /* Destination site */
00161     int    gsidCnt;               /* Number of object Gsid Strings */
00162     char** gsidStrs;              /* Object Gsid strings */
00163 } ownershipChange_t;
00164 
00165 typedef struct stubInfo_s
00166 {
00167     int    masterSiteId;          /* Master site */
00168     int    gsidCnt;               /* Number of object Gsid Strings */
00169     char** gsidStrs;              /* Object Gsid strings */
00170 } stubInfo_t;
00171 
00172 typedef struct locale_data_s
00173 {
00174     tag_t  obj;             //tc object
00175     int    nProps;          //number of locale contents
00176     char** propNames;       //L10N attribute names
00177     char** propValues;      //L10N attribute values
00178 } locale_data_t;
00179 
00180 typedef struct TIEGSIdentityInput_s
00181 {
00182     char* system;
00183     char*  label;
00184     char*  subLabel;
00185     char*  className;
00186     char*  split_token;
00187     char*  context;
00188     char*  object_uid;
00189     char*  factor_id;
00190     logical atomic;
00191 } TIEGSIdentityInput_t;
00192 
00196 typedef enum TIE_export_status_e
00197 {
00198     EXPORT_SUCCESS,
00199     EXPORT_SUCCESS_STUB,
00200     EXPORT_PENDING,
00201     EXPORT_PENDING_STUB,
00202     EXPORT_PENDING_TRANSFER_OWNER,
00203     EXPORT_FAIL,
00204     EXPORT_REPLICA_DELETED,
00205     EXPORT_CONVERT_TO_STUB,
00206     EXPORT_SITE_CHECKIN,
00207     EXPORT_PENDING_SITE_CHECKIN_DELETE,
00208     EXPORT_MAX_STATUS
00209 } TIE_export_status_t;
00210 
00211 #define TIE_serialize_msg       "TIE_serialize"
00212 #define TIE_deserialize_msg     "TIE_deserialize"
00213 
00214 #ifdef __cplusplus
00215     extern "C"{
00216 #endif
00217 
00218 
00222 extern TIE_API int TIE_export_objects(
00223     const char *tcGSMessageId,      
00224     int n_objects,                  
00225     tag_t* objects,                 
00226     int n_siteTags,                 
00227     tag_t* targetSiteTags,          
00228     logical synchronize,            
00229     TIE_transfer_formula_t opts,    
00230     TIE_output_data_t* output_data  
00231     );
00232 
00236 extern TIE_API int TIE_traverse_objects(
00237     const char *tcGSMessageId,      
00238     int n_objects,                  
00239     tag_t* objects,                 
00240     int n_siteTags,                 
00241     tag_t* targetSiteTags,          
00242     logical synchronize,            
00243     TIE_transfer_formula_t opts,    
00244     TIE_output_data_t* output_data  
00245     );
00246 
00250 extern TIE_API int TIE_confirm_export(
00251     tag_t targetSiteTag,          
00252     const char *tcGSMessageId,    
00253     int n_failed_objects,         
00254     tag_t* failed_objects,        
00255     logical commit,               
00256     int *n_ownership,             
00257     ownershipChange_t** ownership,
00258     int *n_stubs,                 
00259     stubInfo_t** stubs            
00260     );
00261 
00265 extern TIE_API int TIE_import_objects(
00266     const char *transaction_id,    
00267     tag_t master_site,             
00268     TIE_transfer_formula_t opts,   
00269     char* input_xml_file,          
00270     TIE_output_data_t* output_data 
00271     );
00272 
00276 extern TIE_API int TIE_get_object_from_mesg(
00277     void* tieGenMesg,              
00278     tag_t* objectTag               
00279     );
00280 
00284 extern TIE_API int TIE_get_preconstructed_uids(
00285         int numRequestedUids,       
00286         int* numConstructedUids,    
00287         char*** constructedUids     
00288 );
00289 
00293 extern TIE_API int TIE_get_hashed_uid(
00294         int ownSiteId,          
00295         const char* hashKey,    
00296         char** hashedUID        
00297 );
00298 
00302 extern TIE_API int TIE_create_gsidentities(
00303         int numInput,                   
00304         TIEGSIdentityInput_t* input,    
00305         int* numGSIDTags,               
00306         tag_t** gsidTags                
00307 );
00308 
00314 typedef int (* TIE_user_action_func_t)( tag_t );
00315 
00316 extern TIE_API int TIE_register_user_action (
00317   char*                      handleName,    
00318   TIE_user_action_func_t     user_m         
00319   );
00320 
00321 
00325 typedef PIE_rule_type_t (* TIE_user_filter_func_t)( void *);
00326 
00327 extern TIE_API int TIE_register_user_filter (
00328   char*          filterRuleName,    
00329   TIE_user_filter_func_t user_m     
00330   );
00331 
00332 extern TIE_API int TIE_get_L10N_properties (
00333   tag_t          sessTag,  
00334   int            nObjs,                    
00335   tag_t*         objTags,                  
00336   locale_data_t  **L10NProps               
00337   );
00338 
00343 extern TIE_API int TIE_lowlevel_confirm_import(
00344     const char       *tcGSMessageId,         
00345     int               nSucessIslands,        
00346     char            **sucessIslands,         
00347     int               nFailureIslands,       
00348     char            **failureIslands);       
00353 extern TIE_API int TIE_lowlevel_confirm_import_with_file(
00354     const char       *tcGSMessageId,         
00355     int               nSucessIslands,        
00356     char            **sucessIslands,         
00357     int               nFailureIslands,       
00358     char            **failureIslands,        
00359     TIE_output_data_t* output_data);         
00365 extern TIE_API int TIE_flip_ownership(
00366     const char *tcGSMessageId,       
00367     int n_siteTags,                  
00368     tag_t* targetSiteTags,           
00369     TIE_output_data_t* output_data,  
00370     logical isFlipDryRun);           
00372 #ifdef __cplusplus
00373 }
00374 #endif
00375 
00376 #include <tie/libtie_undef.h>
00377 
00378 #endif
00379