/[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 2727 - (show annotations) (download)
Mon May 10 01:12:46 2004 UTC (15 years, 8 months ago) by jason
File size: 2942 byte(s)
added some Profile 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
33 bool isSchemeSupported(const Data& scheme);
34 bool isMethodSupported(MethodTypes method);
35 bool isMimeTypeSupported(const Mime& mimeType);
36 bool isContentEncodingSupported(const Token& contentEncoding);
37 bool isLanguageSupported(const Tokens& lang);
38
39 // return the list of unsupported tokens from set of requires tokens
40 Tokens isSupported(const Tokens& requires);
41 Tokens getSupportedOptionTags();
42 Tokens getAllowedMethods();
43 Mimes getSupportedMimeTypes();
44 Tokens getSupportedEncodings();
45 Tokens getSupportedLanguages();
46
47 void addGruu(const Data& aor, const NameAddr& contact);
48 bool hasGruu(const Data& aor);
49 bool hasGruu(const Data& aor, const Data& instance);
50 NameAddr& getGruu(const Data& aor);
51 NameAddr& getGruu(const Data& aor, const NameAddr& contact);
52
53 const NameAddr& getDefaultAor() const;
54
55 void setOutboundProxy( const Data& uri );
56 void disableGruu();
57
58 /// The following functions deal with getting digest credentals
59 //@{
60
61 void addDigestCredential( const Data& realm, const Data& users, const Data& password);
62
63 /** This class is used as a callback to get digest crednetials. The
64 * derived class must define one of computeA1 or getPaswword. computeA1 is
65 * tried first and it it returns an empty string, then getPassword is
66 * tried. */
67 class DigestCredentialHandler
68 {
69 public:
70 virtual Data computeA1( const Data& realm, const Data& users );
71 virtual Data getPassword( const Data& realm, const Data& users );
72 };
73
74 void setDigestHandler( DigestCredentialHandler* handler );
75 //@}
76
77 private:
78 NameAddr mAor;
79 int mDefaultRegistrationExpires;
80
81 std::set<Data> mSupportedSchemes;
82 std::set<MethodTypes> mSupportedMethodTypes;
83 Tokens mSupportedMethods;
84 Tokens mSupportedOptionTags;
85 Mimes mSupportedMimeTypes;
86 Tokens mSupportedEncodings;
87 Tokens mSupportedLanguages;
88 };
89
90
91
92 }
93
94 #endif

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27