ITK Function Reference

(V10000.1.0.60_20160308.00)
project.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2003-2005 UGS Corporation
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
6 /* */
7 
8 #ifndef PROJECT_H
9 #define PROJECT_H
10 
11 #include <unidefs.h>
12 #include <tccore/libtccore_exports.h>
13 
19 #define PROJECT_create_msg "PROJECT_create"
20 #define PROJ_id_size_c 64
21 #define PROJ_name_size_c 32
22 #define PROJ_desc_size_c 240
23 #define PROJECTTEAM_AUTHOR_ROLE "Project Author"
24 
25 #ifdef __cplusplus
26  extern "C"{
27 #endif
28 
39 extern TCCORE_API int PROJ_create_project(
40  const char* project_id,
41  const char* name,
42  const char* description,
43  tag_t* project
44  );
45 
56 extern TCCORE_API int PROJ_find_user_project(
57  tag_t user,
58  logical include_inactive,
59  int* count,
60  tag_t** projects
61  );
62 
73 extern TCCORE_API int PROJ_find(
74  const char* project_id,
75  tag_t* project
76  );
77 
90 extern TCCORE_API int PROJ_assign_objects(
91  int project_count,
92  tag_t* projects,
93  int object_count,
94  tag_t* objects
95  );
96 
106 extern TCCORE_API int PROJ_remove_objects(
107  int project_count,
108  tag_t* projects,
109  int object_count,
110  tag_t* objects
111  );
112 
113 
122 extern TCCORE_API int PROJ_is_user_a_member(
123  tag_t project,
124  tag_t user,
125  logical *answer
126  );
127 
136 extern TCCORE_API int PROJ_is_user_a_privileged_member(
137  tag_t project,
138  tag_t user,
139  logical *answer
142  );
143 
153 extern TCCORE_API int PROJ_add_members(
154  tag_t project,
155  int user_count,
156  tag_t* users_groups_groupmembers
157  );
158 
168 extern TCCORE_API int PROJ_remove_members(
169  tag_t project,
170  int user_count,
171  tag_t* users_groups_groupmembers
172  );
183 extern TCCORE_API int PROJ_add_author_members(
184  tag_t project,
185  int author_count,
186  tag_t* authors
187  );
188 
199 extern TCCORE_API int PROJ_remove_author_members(
200  tag_t project,
201  int author_count,
202  tag_t* authors
203  );
204 
213 extern TCCORE_API int PROJ_ask_author_members(
214  tag_t project,
215  int * author_count,
216  tag_t ** authors
217  );
218 
231 extern TCCORE_API int PROJ_assign_team(
232  tag_t project,
233  int member_count,
234  tag_t* members,
235  tag_t project_administrator,
236  int privileged_user_count,
237  tag_t* privileged_users
238  );
239 
253 extern TCCORE_API int PROJ_assign_team_members(
254  tag_t project,
255  int member_count,
256  tag_t* members,
257  int administrator_count,
258  tag_t* administrators,
259  int privileged_user_count,
260  tag_t* privileged_users
261  );
262 
272 extern TCCORE_API int PROJ_ask_team(
273  tag_t project,
274  int* member_count,
275  tag_t** members,
276  int* administrator_count,
277  tag_t** administrator_tags,
278  int* privileged_user_count,
279  tag_t** privileged_user_tags
280  );
281 
294 extern TCCORE_API int PROJ_copy_project(
295  tag_t source_project,
296  const char * project_id,
297  const char * project_name,
298  const char * project_description,
299  logical active,
300  logical visible,
301  logical use_program_security,
302  tag_t * project
303  );
304 
314 extern TCCORE_API int PROJ_activate_project(
315  tag_t project,
316  logical activate
317  );
318 
327 extern TCCORE_API int PROJ_is_project_active(
328  tag_t project,
329  logical* active
330  );
331 
343 extern TCCORE_API int PROJ_ask_id(
344  tag_t project,
345  char id[PROJ_id_size_c + 1]
346  );
347 
356 extern TCCORE_API int PROJ_ask_id2(
357  tag_t project,
358  char **id
359  );
360 
371 extern TCCORE_API int PROJ_ask_name(
372  tag_t project,
373  char name[PROJ_name_size_c + 1]
374  );
375 
384 extern TCCORE_API int PROJ_ask_name2(
385  tag_t project,
386  char **name
387  );
388 
397 extern TCCORE_API int PROJ_ask_assigned_objects(
398  const char* project_id,
399  int* object_count,
400  tag_t** objects
401  );
402 
419 extern TCCORE_API int PROJ_initialize(
420  tag_t project,
421  const char id[PROJ_id_size_c + 1],
422  const char name[PROJ_name_size_c + 1],
423  const char desc[PROJ_desc_size_c + 1]
424  );
425 
426 /*
427  Initializes a Project object.
428  <br/>It is not saved to the database until an explicit call to #AOM_save occurs.
429  <br/>An id, name and description must be specified.
430  <br/>You normally use this function with a subclass of Project.
431  For example, using a specialized class of Project:
432  <ol>
433  <li>Call #POM_create_instance to create the object in memory.
434  <li>Use #PROJ_initialize to initialize the attributes which were
435  inherited from Project.
436  <li>Use additional POM calls to initialize the attributes comprising
437  your specialization of Project.
438  </ol>
439  @returns
440  <ul>
441  <li>#ITK_ok on success
442  <li>#SA_group_name_already_used if the @p project already exists.
443  <li>#POM_string_too_long if any of the @p project_id, @p name or @p description arguments is too long (respectively more than #PROJ_id_size_c, #PROJ_name_size_c and #PROJ_desc_size_c).
444  <li>#POM_insufficient_privilege if the logged-in user is not a privileged member.
445  </ul>
446 */
447 extern TCCORE_API int PROJ_initialize2(
448  tag_t project,
449  const char *id,
450  const char *name,
451  const char *description
452  );
453 
464 extern TCCORE_API int PROJ_create_project_with_options(
465  const char* project_id,
466  const char* name,
467  const char* description,
468  const logical use_program_level_security,
469  tag_t* project
470  );
471 
482 extern TCCORE_API int PROJ_edit_project_options(
483  tag_t project,
484  const logical use_program_level_security
485  );
486 
497 extern TCCORE_API int PROJ__set_default_project(
498  int member_count,
499  tag_t *members,
500  tag_t project
501  );
502 
518 extern TCCORE_API int PROJ_find_user_projects
519 (
520  tag_t user,
521  logical active_projects_only,
522  logical privileged_projects_only,
523  logical programs_only,
524  int* n_projects,
525  tag_t** projects
526 );
527 
536 extern TCCORE_API int PROJ_find_objects_in_projects
537 (
538  const char * project_id,
539  int filter_criteria,
540  const char ** filter_names,
541  const char ** filter_values,
542  int * number_objects,
543  tag_t ** objects
544 );
545 
548 #ifdef __cplusplus
549 }
550 #endif
551 
552 #include <tccore/libtccore_undef.h>
553 
554 #endif