/[resiprocate]/main/sip/resiprocate/dum/Profile.hxx
ViewVC logotype

Contents of /main/sip/resiprocate/dum/Profile.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2840 - (show annotations) (download)
Sun May 30 01:27:10 2004 UTC (15 years, 7 months ago) by fluffy
File size: 2982 byte(s)
started subscription stuff
1 #if !defined(RESIP_PROFILE_HXX)
2 #define RESIP_PROFILE_HXX
3
4 #include <set>
5 #include "resiprocate/Headers.hxx"
6 #include "resiprocate/MethodTypes.hxx"
7
8 namespace resip
9 {
10
11 class Data;
12
13 // !jf! will want to provide a default subclass of Profile that provides some
14 // good defaults for the Profile
15 class Profile
16 {
17 public:
18 Profile();
19
20 void setDefaultAor(const NameAddr& from);
21 void setDefaultRegistrationTime(int secs);
22
23 void addSupportedScheme(const Data& scheme);
24 void addSupportedMethod(const MethodTypes& method);
25 void addSupportedOptionTags(const Token& tag);
26 void addSupportedMimeType(const Mime& mimeType);
27 void addSupportedEncoding(const Token& encoding);
28 void addSupportedLanguage(const Token& lang);
29
30 NameAddr& getDefaultAor();
31 int getDefaultRegistrationTime();
32 int getDefaultSubscriptionTime();
33
34 bool isSchemeSupported(const Data& scheme);
35 bool isMethodSupported(MethodTypes method);
36 bool isMimeTypeSupported(const Mime& mimeType);
37 bool isContentEncodingSupported(const Token& contentEncoding);
38 bool isLanguageSupported(const Tokens& lang);
39
40 // return the list of unsupported tokens from set of requires tokens
41 Tokens isSupported(const Tokens& requires);
42 Tokens getSupportedOptionTags();
43 Tokens getAllowedMethods();
44 Mimes getSupportedMimeTypes();
45 Tokens getSupportedEncodings();
46 Tokens getSupportedLanguages();
47
48 void addGruu(const Data& aor, const NameAddr& contact);
49 bool hasGruu(const Data& aor);
50 bool hasGruu(const Data& aor, const Data& instance);
51 NameAddr& getGruu(const Data& aor);
52 NameAddr& getGruu(const Data& aor, const NameAddr& contact);
53
54 const NameAddr& getDefaultAor() const;
55
56 void setOutboundProxy( const Data& uri );
57 void disableGruu();
58
59 /// The following functions deal with getting digest credentals
60 //@{
61
62 void addDigestCredential( const Data& realm, const Data& users, const Data& password);
63
64 /** This class is used as a callback to get digest crednetials. The
65 * derived class must define one of computeA1 or getPaswword. computeA1 is
66 * tried first and it it returns an empty string, then getPassword is
67 * tried. */
68 class DigestCredentialHandler
69 {
70 public:
71 virtual Data computeA1( const Data& realm, const Data& users );
72 virtual Data getPassword( const Data& realm, const Data& users );
73 };
74
75 void setDigestHandler( DigestCredentialHandler* handler );
76 //@}
77
78 private:
79 NameAddr mAor;
80 int mDefaultRegistrationExpires;
81
82 std::set<Data> mSupportedSchemes;
83 std::set<MethodTypes> mSupportedMethodTypes;
84 Tokens mSupportedMethods;
85 Tokens mSupportedOptionTags;
86 Mimes mSupportedMimeTypes;
87 Tokens mSupportedEncodings;
88 Tokens mSupportedLanguages;
89 };
90
91
92
93 }
94
95 #endif

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27