sipxtacklib  Version 3.3
ProvisioningAttrList.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _ProvisioningAttrList_h_
12 #define _ProvisioningAttrList_h_
13 
14 // SYSTEM INCLUDES
15 // APPLICATION INCLUDES
16 #include <utl/UtlString.h>
17 
18 // DEFINES
19 // MACROS
20 // EXTERNAL FUNCTIONS
21 // EXTERNAL VARIABLES
22 // CONSTANTS
23 // STRUCTS
24 // TYPEDEFS
25 // FORWARD DECLARATIONS
26 class UtlHashMap;
27 class UtlSList;
28 class UtlContainable;
29 
34 public:
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 
38  INT,
41  };
42 
43 /* ============================ CREATORS ================================== */
44 
49 
53  ProvisioningAttrList(UtlHashMap* pData);
54 
58  virtual ~ProvisioningAttrList();
59 
60 /* ============================ MANIPULATORS ============================== */
61 
62  bool setAttribute(const char* pKey, UtlSList* pValue);
63  bool setAttribute(const char* pKey, const UtlString& rValue);
64  bool setAttribute(const char* pKey, const char* pValue);
65  bool setAttribute(const char* pKey, int value);
66  bool setAttribute(const char* pKey, bool value);
67 
68 /* ============================ ACCESSORS ================================= */
69 
70  UtlContainable* getAttribute(const char* pKey);
71  UtlContainable* operator[](const char* pKey) { return getAttribute(pKey);}
72  bool getAttribute(const char* pKey, UtlString& rValue);
73  bool getAttribute(const char* pKey, const char*& prValue);
74  bool getAttribute(const char* pKey, int& rValue);
75  bool getAttribute(const char* pKey, bool& rValue);
76  UtlHashMap* getData(void) { return mpData;}
77  void dumpAttributes(void);
78 
79 /* ============================ INQUIRY =================================== */
80 
81  bool attributeMissing(const char* pKey);
82  bool attributePresent(const char* pKey);
83  void validateAttribute(const char* pKey, eAttributeType type, bool ignoreMissing = false);
84  void validateAttributeType(const char* pKey, eAttributeType type);
85 
86 /* //////////////////////////// PROTECTED ///////////////////////////////// */
87 protected:
88  void deleteAttrElements(UtlContainable* pAttrElements);
89  static void dumpAttributes(const UtlContainable* pAttribute);
90 
91 /* //////////////////////////// PRIVATE /////////////////////////////////// */
92 private:
93  UtlHashMap* mpData; /* Pointer to the containing data. */
94  bool mIsReference; /* Is mpData a reference ? */
95 };
96 
97 #endif // _ProvisioningAttrList_h_
98 
void deleteAttrElements(UtlContainable *pAttrElements)
Definition: ProvisioningAttrList.cpp:604
ProvisioningAttrList(void)
Default constructor.
Definition: ProvisioningAttrList.cpp:48
Definition: ProvisioningAttrList.h:33
Definition: ProvisioningAttrList.h:39
UtlContainable * getAttribute(const char *pKey)
Definition: ProvisioningAttrList.cpp:277
bool setAttribute(const char *pKey, UtlSList *pValue)
Definition: ProvisioningAttrList.cpp:120
Definition: ProvisioningAttrList.h:38
bool attributeMissing(const char *pKey)
Definition: ProvisioningAttrList.cpp:469
void validateAttribute(const char *pKey, eAttributeType type, bool ignoreMissing=false)
Definition: ProvisioningAttrList.cpp:515
bool attributePresent(const char *pKey)
Definition: ProvisioningAttrList.cpp:492
eAttributeType
Definition: ProvisioningAttrList.h:37
UtlHashMap * getData(void)
Definition: ProvisioningAttrList.h:76
Definition: ProvisioningAttrList.h:40
virtual ~ProvisioningAttrList()
Destructor.
Definition: ProvisioningAttrList.cpp:94
void validateAttributeType(const char *pKey, eAttributeType type)
Definition: ProvisioningAttrList.cpp:579
void dumpAttributes(void)
Definition: ProvisioningAttrList.cpp:445
UtlContainable * operator[](const char *pKey)
Definition: ProvisioningAttrList.h:71

sipXtackLib home page