• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 
19 #ifndef SESSION_INFO_H
20 #define SESSION_INFO_H
21 
22 #define FRESH_TOKEN_SIZE    30
23 #define OMADRM_ENC_KEY_DATA_SIZE    50
24 #define AUTH_TAG_SIZE   30
25 
26 
27 #include "oscl_types.h"
28 #include "oscl_string_containers.h"
29 #include "oscl_time.h"
30 #include "oscl_vector.h"
31 #include "rtsp_time_formats.h"
32 #include "rtsp_range_utils.h"
33 #include "sdp_error.h"
34 #include "sdp_memory.h"
35 #include "common_info.h"
36 #ifndef __MEDIA_CLOCK_CONVERTER_H
37 #include "media_clock_converter.h"
38 #endif
39 
40 typedef struct _originatorInfo
41 {
42     OSCL_HeapString<SDPParserAlloc> originatorUsername;
43     uint32 originatorSessionID;
44     uint32 originatorVersion;
45     OSCL_HeapString<SDPParserAlloc> originatorNetworkType;
46     OSCL_HeapString<SDPParserAlloc> originatorAddressType;
47     OSCL_HeapString<SDPParserAlloc> originatorAddress;
48 
49 
50 
51 } originatorInfo;
52 
53 
54 
55 typedef struct _sessionTime
56 {
57     uint64 sessionStartTime;
58     uint64 sessionStopTime;
59 } sessionTime;
60 enum EndOfClipAction { DEFAULT, CLOSE_PLAYER, LAUNCH_URL, DO_NOTHING };
61 enum VideoOnlyStatus { ALLOWED, NOT_ALLOWED, NOT_PRESENT };
62 
63 enum SDPAltGroupType
64 {
65     SDP_ALT_GROUP_NONE,
66     SDP_ALT_GROUP_BANDWIDTH,
67     SDP_ALT_GROUP_LANGUAGE
68 };
69 
70 class sessionDescription
71 {
72         SDPAltGroupType iSDPAltGroupType;
73 
74         OSCL_HeapString<SDPParserAlloc> type;
75 
76         int protocolVersion;
77 
78         originatorInfo origInfo;
79 
80 
81         OSCL_HeapString<SDPParserAlloc> sessionName;
82 
83         OSCL_HeapString<SDPParserAlloc> sessionInformation;
84         OSCL_HeapString<SDPParserAlloc> sessionURI;
85 
86         connectionInfo connectInfo;
87 
88         bool c_field_found;
89         OSCL_HeapString<SDPParserAlloc> version;
90 
91         OSCL_HeapString<SDPParserAlloc> author;
92         OSCL_HeapString<SDPParserAlloc> copyright;
93         OSCL_HeapString<SDPParserAlloc> rating;
94 
95 
96         uint32 repeatInterval;  // in seconds
97         uint32 activeDuration;  // in seconds
98 
99         Oscl_Vector<uint32, SDPParserAlloc> listOfOffsetsFromStartTime;
100 
101         RtspRangeType session_range;
102 
103         OSCL_HeapString<SDPParserAlloc> wmfVersion;
104 
105         bool allowRecord;
106         bool randomAccessDenied;
107         VideoOnlyStatus videoOnlyAllowed;
108         OSCL_HeapString<SDPParserAlloc> controlURL;
109 
110         OSCL_HeapString<SDPParserAlloc> creationDate;
111 
112         OSCL_HeapString<SDPParserAlloc> eTag;
113         bool pauseDenied;
114         //  char securityFlag;
115         OSCL_HeapString<SDPParserAlloc> randomFiller;
116         OSCL_HeapString<SDPParserAlloc> digitalSignature;
117         OSCL_HeapString<SDPParserAlloc> launchURL;
118         EndOfClipAction endOfClip;
119         OSCL_HeapString<SDPParserAlloc> appSpecificString;
120         OSCL_HeapString<SDPParserAlloc> expiryDate;
121         OSCL_HeapString<SDPParserAlloc> email;
122         OSCL_HeapString<SDPParserAlloc> phoneNumber;
123         OSCL_HeapString<SDPParserAlloc> encryptionKey;
124 
125 
126         // For ASF
127         unsigned char *asfHeaderPtr;
128         int asfHeaderSize;
129         bool asfTrue;
130 
131         int bitrate;
132         int rtcpBWSender;
133         int rtcpBWReceiver;
134         int BWtias;
135 
136         QoEMetricsType qoeMetrics;
137         OSCL_HeapString<SDPParserAlloc> intKeyFreshToken;
138         OSCL_HeapString<SDPParserAlloc> intKeyMethod;
139         OSCL_HeapString<SDPParserAlloc> intKeyData;
140         OSCL_HeapString<SDPParserAlloc> intKeyContentIdURI ;
141         OSCL_HeapString<SDPParserAlloc> intKeyRightIssuerURI ;
142         OSCL_HeapString<SDPParserAlloc> sdpAuthTag;
143 
144         AssetInfoType assetInfo;
145 
146         OSCL_HeapString<SDPParserAlloc> altGroupBW;
147         OSCL_HeapString<SDPParserAlloc> altGroupLANG;
148         OsclFloat maxprate;
149 
150         NTPTime sessionStartTime;
151         NTPTime sessionStopTime;
152         //End additions
153 
154         // added for RM
155         uint32                          SdpplinVersion;
156         uint32                          Flags;
157         uint32                          IsRealDataType;
158         uint32                          StreamCount;
159         OSCL_HeapString<SDPParserAlloc> ASMRuleBook;
160         OSCL_HeapString<SDPParserAlloc> Title;
161         OSCL_HeapString<SDPParserAlloc> Keywords;
162         OSCL_HeapString<SDPParserAlloc> Abstract;
163 
164         // packet source additions
165         OSCL_HeapString<SDPParserAlloc> SdpFilename;
166     public:
sessionDescription()167         sessionDescription()
168         {
169             resetSessionDescription();
170 
171         };
~sessionDescription()172         ~sessionDescription()
173         {
174             OSCL_DELETE(asfHeaderPtr);
175             asfHeaderPtr = NULL;
176             assetInfo.CleanUp();
177         };
178 
179         // added for RM
180 
setSdpplinVersion(int version)181         inline void setSdpplinVersion(int version)
182         {
183             SdpplinVersion = version;
184         };
185 
setFlags(int flags)186         inline void setFlags(int flags)
187         {
188             Flags = flags;
189         };
190 
setStreamCount(int count)191         inline void setStreamCount(int count)
192         {
193             StreamCount = count;
194         };
195 
setIsRealDataType(int isreal)196         inline void setIsRealDataType(int isreal)
197         {
198             IsRealDataType = isreal;
199         }
200 
setKeywords(const OSCL_HeapString<SDPParserAlloc> & keywords)201         inline void setKeywords(const OSCL_HeapString<SDPParserAlloc>& keywords)
202         {
203             Keywords = keywords;
204         }
205 
setKeywords(const OsclMemoryFragment memFrag)206         inline void setKeywords(const OsclMemoryFragment memFrag)
207         {
208             Keywords.set((const char*)(memFrag.ptr), memFrag.len);
209         };
210 
setAbstract(const OSCL_HeapString<SDPParserAlloc> & abstract)211         inline void setAbstract(const OSCL_HeapString<SDPParserAlloc>& abstract)
212         {
213             Abstract = abstract;
214         }
215 
setAbstract(const OsclMemoryFragment memFrag)216         inline void setAbstract(const OsclMemoryFragment memFrag)
217         {
218             Abstract.set((const char*)(memFrag.ptr), memFrag.len);
219         };
220 
setASMRuleBook(const OSCL_HeapString<SDPParserAlloc> & rule)221         inline void setASMRuleBook(const OSCL_HeapString<SDPParserAlloc>& rule)
222         {
223             ASMRuleBook = rule;
224         }
225 
setASMRuleBook(const OsclMemoryFragment memFrag)226         inline void setASMRuleBook(const OsclMemoryFragment memFrag)
227         {
228             ASMRuleBook.set((const char*)(memFrag.ptr), memFrag.len);
229         };
230 
setTitle(const OSCL_HeapString<SDPParserAlloc> & title)231         inline void setTitle(const OSCL_HeapString<SDPParserAlloc>& title)
232         {
233             Title = title;
234         }
235 
setTitle(const OsclMemoryFragment memFrag)236         inline void setTitle(const OsclMemoryFragment memFrag)
237         {
238             Title.set((const char*)(memFrag.ptr), memFrag.len);
239         };
240 
241         // end RM
242 
setProtocolVersion(int protocol)243         inline void setProtocolVersion(int protocol)
244         {
245             protocolVersion = protocol;
246         };
setSessionName(char * sName)247         inline void setSessionName(char* sName)
248         {
249             sessionName = sName;
250         };
setSessionName(const OSCL_HeapString<SDPParserAlloc> & sName)251         inline void setSessionName(const OSCL_HeapString<SDPParserAlloc>& sName)
252         {
253             sessionName = sName;
254         };
setSessionName(const OsclMemoryFragment memFrag)255         inline void setSessionName(const OsclMemoryFragment memFrag)
256         {
257             sessionName.set((const char*)(memFrag.ptr), memFrag.len);
258         };
259 
setSessionInformation(char * sInfo)260         inline void setSessionInformation(char* sInfo)
261         {
262             sessionInformation = sInfo;
263         };
setSessionInformation(const OSCL_HeapString<SDPParserAlloc> & sInfo)264         inline void setSessionInformation(const OSCL_HeapString<SDPParserAlloc>& sInfo)
265         {
266             sessionInformation = sInfo;
267         };
setSessionInformation(const OsclMemoryFragment memFrag)268         inline void setSessionInformation(const OsclMemoryFragment memFrag)
269         {
270             sessionInformation.set((const char*)(memFrag.ptr), memFrag.len);
271         };
setSessionURI(const OsclMemoryFragment memFrag)272         inline void setSessionURI(const OsclMemoryFragment memFrag)
273         {
274             sessionURI.set((const char*)(memFrag.ptr), memFrag.len);
275         };
276 
setVersion(char * pvVersion)277         inline void setVersion(char *pvVersion)
278         {
279             version = pvVersion;
280         };
setVersion(const OSCL_HeapString<SDPParserAlloc> & pvVersion)281         inline void setVersion(const OSCL_HeapString<SDPParserAlloc>& pvVersion)
282         {
283             version = pvVersion;
284         };
setVersion(const OsclMemoryFragment memFrag)285         inline void setVersion(const OsclMemoryFragment memFrag)
286         {
287             version.set((const char*)(memFrag.ptr), memFrag.len);
288         };
289 
setAuthor(char * auth)290         inline void setAuthor(char* auth)
291         {
292             author = auth;
293         };
setAuthor(const OSCL_HeapString<SDPParserAlloc> & auth)294         inline void setAuthor(const OSCL_HeapString<SDPParserAlloc>& auth)
295         {
296             author = auth;
297         };
setAuthor(const OsclMemoryFragment memFrag)298         inline void setAuthor(const OsclMemoryFragment memFrag)
299         {
300             author.set((const char*)(memFrag.ptr), memFrag.len);
301         };
302 
setCopyright(char * cpright)303         inline void setCopyright(char* cpright)
304         {
305             copyright = cpright;
306         };
setCopyright(const OSCL_HeapString<SDPParserAlloc> & cpright)307         inline void setCopyright(const OSCL_HeapString<SDPParserAlloc>& cpright)
308         {
309             copyright = cpright;
310         };
setCopyright(const OsclMemoryFragment memFrag)311         inline void setCopyright(const OsclMemoryFragment memFrag)
312         {
313             copyright.set((const char*)(memFrag.ptr), memFrag.len);
314         };
315 
setRating(char * srating)316         inline void setRating(char* srating)
317         {
318             rating = srating;
319         };
setRating(const OSCL_HeapString<SDPParserAlloc> & srating)320         inline void setRating(const OSCL_HeapString<SDPParserAlloc>& srating)
321         {
322             rating = srating;
323         };
setRating(const OsclMemoryFragment memFrag)324         inline void setRating(const OsclMemoryFragment memFrag)
325         {
326             rating.set((const char*)(memFrag.ptr), memFrag.len);
327         };
328 
setSessionStartTime(uint64 start)329         inline void setSessionStartTime(uint64 start)
330         {
331             sessionStartTime = start;
332         };
setSessionStopTime(uint64 stop)333         inline void setSessionStopTime(uint64 stop)
334         {
335             sessionStopTime = stop;
336         };
337 
setRepeatInterval(uint32 interval)338         inline void setRepeatInterval(uint32 interval)
339         {
340             repeatInterval = interval;
341         };
setActiveDuration(uint32 duration)342         inline void setActiveDuration(uint32 duration)
343         {
344             activeDuration = duration;
345         };
addOffset(uint32 offset)346         inline void addOffset(uint32 offset)
347         {
348             listOfOffsetsFromStartTime.push_back(offset);
349         };
setOffsetVector(Oscl_Vector<uint32,SDPParserAlloc> offsetVec)350         inline void setOffsetVector(Oscl_Vector<uint32, SDPParserAlloc> offsetVec)
351         {
352             listOfOffsetsFromStartTime = offsetVec;
353         };
354 
setRange(const RtspRangeType & in_range)355         inline void setRange(const RtspRangeType& in_range)
356         {
357             session_range = in_range;
358         }
setWmfVersion(char * wmfver)359         inline void setWmfVersion(char* wmfver)
360         {
361             wmfVersion = wmfver;
362         };
setWmfVersion(const OSCL_HeapString<SDPParserAlloc> & wmfver)363         inline void setWmfVersion(const OSCL_HeapString<SDPParserAlloc>& wmfver)
364         {
365             wmfVersion = wmfver;
366         };
setWmfVersion(const OsclMemoryFragment memFrag)367         inline void setWmfVersion(const OsclMemoryFragment memFrag)
368         {
369             wmfVersion.set((const char*)(memFrag.ptr), memFrag.len);
370         };
371 
setAllowRecord(bool arecord)372         inline void setAllowRecord(bool arecord)
373         {
374             allowRecord = arecord;
375         };
setRandomAccessDenied(bool accessdenied)376         inline void setRandomAccessDenied(bool accessdenied)
377         {
378             randomAccessDenied = accessdenied;
379         };
setVideoOnlyAllowed(VideoOnlyStatus videoallowed)380         inline void setVideoOnlyAllowed(VideoOnlyStatus videoallowed)
381         {
382             videoOnlyAllowed = videoallowed;
383         };
setControlURL(char * ctrl)384         inline void setControlURL(char* ctrl)
385         {
386             controlURL = ctrl;
387         };
setControlURL(const OSCL_HeapString<SDPParserAlloc> & ctrl)388         inline void setControlURL(const OSCL_HeapString<SDPParserAlloc>& ctrl)
389         {
390             controlURL = ctrl;
391         };
setControlURL(const OsclMemoryFragment memFrag)392         inline void setControlURL(const OsclMemoryFragment memFrag)
393         {
394             controlURL.set((const char*)(memFrag.ptr), memFrag.len);
395         };
396 
setOriginator()397         inline void setOriginator() {};
setOUsername(char * username)398         inline void setOUsername(char *username)
399         {
400             origInfo.originatorUsername = username;
401         }
setOUsername(const OSCL_HeapString<SDPParserAlloc> & username)402         inline void setOUsername(const OSCL_HeapString<SDPParserAlloc>& username)
403         {
404             origInfo.originatorUsername = username;
405         }
setOUsername(const OsclMemoryFragment memFrag)406         inline void setOUsername(const OsclMemoryFragment memFrag)
407         {
408             origInfo.originatorUsername.set((const char*)(memFrag.ptr), memFrag.len);
409         }
410 
setOSessionID(int OSID)411         inline void setOSessionID(int OSID)
412         {
413             origInfo.originatorSessionID = OSID;
414         };
415 
setOVersion(int OSV)416         inline void setOVersion(int OSV)
417         {
418             origInfo.originatorVersion = OSV;
419         };
420 
setONetworkType(char * nType)421         inline void setONetworkType(char* nType)
422         {
423             origInfo.originatorNetworkType = nType;
424         };
setONetworkType(const OSCL_HeapString<SDPParserAlloc> & nType)425         inline void setONetworkType(const OSCL_HeapString<SDPParserAlloc>& nType)
426         {
427             origInfo.originatorNetworkType = nType;
428         };
setONetworkType(const OsclMemoryFragment memFrag)429         inline void setONetworkType(const OsclMemoryFragment memFrag)
430         {
431             origInfo.originatorNetworkType.set((const char*)(memFrag.ptr), memFrag.len);
432         };
433 
setOAddressType(char * aType)434         inline void setOAddressType(char* aType)
435         {
436             origInfo.originatorAddressType = aType;
437         };
setOAddressType(const OSCL_HeapString<SDPParserAlloc> & aType)438         inline void setOAddressType(const OSCL_HeapString<SDPParserAlloc>& aType)
439         {
440             origInfo.originatorAddressType = aType;
441         };
setOAddressType(const OsclMemoryFragment memFrag)442         inline void setOAddressType(const OsclMemoryFragment memFrag)
443         {
444             origInfo.originatorAddressType.set((const char*)(memFrag.ptr), memFrag.len);
445         };
446 
setOAddress(char * address)447         inline void setOAddress(char* address)
448         {
449             origInfo.originatorAddress = address;
450         };
setOAddress(const OSCL_HeapString<SDPParserAlloc> & address)451         inline void setOAddress(const OSCL_HeapString<SDPParserAlloc>& address)
452         {
453             origInfo.originatorAddress = address;
454         };
setOAddress(const OsclMemoryFragment memFrag)455         inline void setOAddress(const OsclMemoryFragment memFrag)
456         {
457             origInfo.originatorAddress.set((const char*)(memFrag.ptr), memFrag.len);
458         };
459 
setCNetworkType(char * nType)460         inline void setCNetworkType(char *nType)
461         {
462             connectInfo.connectionNetworkType = nType;
463         };
setCNetworkType(const OSCL_HeapString<SDPParserAlloc> & nType)464         inline void setCNetworkType(const OSCL_HeapString<SDPParserAlloc>& nType)
465         {
466             connectInfo.connectionNetworkType = nType;
467         };
setCNetworkType(const OsclMemoryFragment memFrag)468         inline void setCNetworkType(const OsclMemoryFragment memFrag)
469         {
470             connectInfo.connectionNetworkType.set((const char*)(memFrag.ptr), memFrag.len);
471         };
472 
setCAddressType(char * aType)473         inline void setCAddressType(char* aType)
474         {
475             connectInfo.connectionAddressType = aType;
476         };
setCAddressType(const OSCL_HeapString<SDPParserAlloc> & aType)477         inline void setCAddressType(const OSCL_HeapString<SDPParserAlloc>& aType)
478         {
479             connectInfo.connectionAddressType = aType;
480         };
setCAddressType(const OsclMemoryFragment memFrag)481         inline void setCAddressType(const OsclMemoryFragment memFrag)
482         {
483             connectInfo.connectionAddressType.set((const char*)(memFrag.ptr), memFrag.len);
484         };
485 
setCAddress(char * address)486         inline void setCAddress(char* address)
487         {
488             connectInfo.connectionAddress = address;
489         };
setCAddress(const OSCL_HeapString<SDPParserAlloc> & address)490         inline void setCAddress(const OSCL_HeapString<SDPParserAlloc>& address)
491         {
492             connectInfo.connectionAddress = address;
493         };
setCAddress(const OsclMemoryFragment memFrag)494         inline void setCAddress(const OsclMemoryFragment memFrag)
495         {
496             connectInfo.connectionAddress.set((const char*)(memFrag.ptr), memFrag.len);
497         };
498 
setCreationDate(char * cDate)499         inline void setCreationDate(char *cDate)
500         {
501             creationDate = cDate;
502         };
setCreationDate(const OSCL_HeapString<SDPParserAlloc> & cDate)503         inline void setCreationDate(const OSCL_HeapString<SDPParserAlloc>& cDate)
504         {
505             creationDate = cDate;
506         };
setCreationDate(const OsclMemoryFragment memFrag)507         inline void setCreationDate(const OsclMemoryFragment memFrag)
508         {
509             creationDate.set((const char*)(memFrag.ptr), memFrag.len);
510         };
511 
512 
setETag(char * et)513         inline void setETag(char *et)
514         {
515             eTag = et;
516         }
setETag(const OSCL_HeapString<SDPParserAlloc> & et)517         inline void setETag(const OSCL_HeapString<SDPParserAlloc>& et)
518         {
519             eTag = et;
520         }
setETag(const OsclMemoryFragment memFrag)521         inline void setETag(const OsclMemoryFragment memFrag)
522         {
523             eTag.set((const char*)(memFrag.ptr), memFrag.len);
524         }
setRandomFiller(char * rf)525         inline void setRandomFiller(char *rf)
526         {
527             randomFiller = rf;
528         }
setRandomFiller(const OSCL_HeapString<SDPParserAlloc> & rf)529         inline void setRandomFiller(const OSCL_HeapString<SDPParserAlloc>& rf)
530         {
531             randomFiller = rf;
532         }
setRandomFiller(const OsclMemoryFragment memFrag)533         inline void setRandomFiller(const OsclMemoryFragment memFrag)
534         {
535             randomFiller.set((const char*)(memFrag.ptr), memFrag.len);
536         }
537 
setDigitalSignature(char * ds)538         inline void setDigitalSignature(char *ds)
539         {
540             digitalSignature = ds;
541         }
setDigitalSignature(const OSCL_HeapString<SDPParserAlloc> & ds)542         inline void setDigitalSignature(const OSCL_HeapString<SDPParserAlloc>& ds)
543         {
544             digitalSignature = ds;
545         }
setDigitalSignature(const OsclMemoryFragment memFrag)546         inline void setDigitalSignature(const OsclMemoryFragment memFrag)
547         {
548             digitalSignature.set((const char*)(memFrag.ptr), memFrag.len);
549         }
550 
setLaunchURL(char * lu)551         inline void setLaunchURL(char *lu)
552         {
553             launchURL = lu;
554         }
setLaunchURL(const OSCL_HeapString<SDPParserAlloc> & lu)555         inline void setLaunchURL(const OSCL_HeapString<SDPParserAlloc>& lu)
556         {
557             launchURL = lu;
558         }
setLaunchURL(const OsclMemoryFragment memFrag)559         inline void setLaunchURL(const OsclMemoryFragment memFrag)
560         {
561             launchURL.set((const char*)(memFrag.ptr), memFrag.len);
562         }
563 
setEndOfClipAction(EndOfClipAction eoc)564         inline void setEndOfClipAction(EndOfClipAction eoc)
565         {
566             endOfClip = eoc;
567         }
568 
setAppSpecificString(char * app_spec_str)569         inline void setAppSpecificString(char *app_spec_str)
570         {
571             appSpecificString = app_spec_str;
572         }
setAppSpecificString(const OSCL_HeapString<SDPParserAlloc> & app_spec_str)573         inline void setAppSpecificString(const OSCL_HeapString<SDPParserAlloc>& app_spec_str)
574         {
575             appSpecificString = app_spec_str;
576         }
setAppSpecificString(const OsclMemoryFragment memFrag)577         inline void setAppSpecificString(const OsclMemoryFragment memFrag)
578         {
579             appSpecificString.set((const char*)(memFrag.ptr), memFrag.len);
580         }
581 
setExpiryDate(char * exp_date)582         inline void setExpiryDate(char *exp_date)
583         {
584             expiryDate = exp_date;
585         }
setExpiryDate(const OSCL_HeapString<SDPParserAlloc> & exp_date)586         inline void setExpiryDate(const OSCL_HeapString<SDPParserAlloc>& exp_date)
587         {
588             expiryDate = exp_date;
589         }
setExpiryDate(const OsclMemoryFragment memFrag)590         inline void setExpiryDate(const OsclMemoryFragment memFrag)
591         {
592             expiryDate.set((const char*)(memFrag.ptr), memFrag.len);
593         }
setPauseDenied(bool pDenied)594         inline void setPauseDenied(bool pDenied)
595         {
596             pauseDenied = pDenied;
597         }
setEmail(char * em)598         inline void setEmail(char *em)
599         {
600             email = em;
601         }
setEmail(const OSCL_HeapString<SDPParserAlloc> & em)602         inline void setEmail(const OSCL_HeapString<SDPParserAlloc>& em)
603         {
604             email = em;
605         }
setEmail(const OsclMemoryFragment memFrag)606         inline void setEmail(const OsclMemoryFragment memFrag)
607         {
608             email.set((const char*)(memFrag.ptr), memFrag.len);
609         }
setPhoneNumber(char * number)610         inline void setPhoneNumber(char *number)
611         {
612             phoneNumber = number;
613         }
setPhoneNumber(const OSCL_HeapString<SDPParserAlloc> & number)614         inline void setPhoneNumber(const OSCL_HeapString<SDPParserAlloc>& number)
615         {
616             phoneNumber = number;
617         }
setPhoneNumber(const OsclMemoryFragment memFrag)618         inline void setPhoneNumber(const OsclMemoryFragment memFrag)
619         {
620             phoneNumber.set((const char*)(memFrag.ptr), memFrag.len);
621         }
setEncryptionKey(char * key)622         inline void setEncryptionKey(char *key)
623         {
624             encryptionKey = key;
625         }
setEncryptionKey(const OSCL_HeapString<SDPParserAlloc> & key)626         inline void setEncryptionKey(const OSCL_HeapString<SDPParserAlloc>& key)
627         {
628             encryptionKey = key;
629         }
setEncryptionKey(const OsclMemoryFragment memFrag)630         inline void setEncryptionKey(const OsclMemoryFragment memFrag)
631         {
632             encryptionKey.set((const char*)(memFrag.ptr), memFrag.len);
633         }
634 
setBitrate(int bRate)635         inline void setBitrate(int bRate)
636         {
637             bitrate = bRate;
638         };
setRTCPSenderBitRate(int bRate)639         inline void setRTCPSenderBitRate(int bRate)
640         {
641             rtcpBWSender = bRate;
642         };
setRTCPReceiverBitRate(int bRate)643         inline void setRTCPReceiverBitRate(int bRate)
644         {
645             rtcpBWReceiver = bRate;
646         };
647 
setBWtias(int bRate)648         inline void setBWtias(int bRate)
649         {
650             BWtias = bRate;
651         }
652 
setQoEMetrics(const QoEMetricsType & qMetrics)653         inline void setQoEMetrics(const QoEMetricsType &qMetrics)
654         {
655             qoeMetrics = qMetrics;
656         };
657 
setKeyMethod(const char * keymethod,int size)658         inline void setKeyMethod(const char *keymethod, int size)
659         {
660             intKeyMethod.set(keymethod, size);
661         }
662 
setKeyMethod(const OSCL_HeapString<SDPParserAlloc> & keymethod)663         inline void setKeyMethod(const OSCL_HeapString<SDPParserAlloc> &keymethod)
664         {
665             intKeyMethod = keymethod;
666         }
667 
668 
setKeyData(const char * keydata,int size)669         inline void setKeyData(const char *keydata, int size)
670         {
671             intKeyData.set(keydata, size);
672 
673         }
674 
setKeyData(const OSCL_HeapString<SDPParserAlloc> & keydata)675         inline void setKeyData(const OSCL_HeapString<SDPParserAlloc> &keydata)
676         {
677             intKeyData = keydata;
678 
679         }
680 
setKeyContentIdURI(const char * contURI,int size)681         inline void setKeyContentIdURI(const char* contURI, int size)
682         {
683             intKeyContentIdURI.set(contURI, size);
684         }
685 
setKeyContentIdURI(const OSCL_HeapString<SDPParserAlloc> & contURI)686         inline void setKeyContentIdURI(const OSCL_HeapString<SDPParserAlloc> &contURI)
687         {
688             intKeyContentIdURI = contURI;
689         }
690 
setKeyRightIssuerURI(const char * issuerURI,int size)691         inline void setKeyRightIssuerURI(const char* issuerURI, int size)
692         {
693             intKeyRightIssuerURI.set(issuerURI, size);
694         }
setKeyRightIssuerURI(const OSCL_HeapString<SDPParserAlloc> & issuerURI)695         inline void setKeyRightIssuerURI(const OSCL_HeapString<SDPParserAlloc> &issuerURI)
696         {
697             intKeyRightIssuerURI = issuerURI;
698         }
699 
700 
setKeyFreshToken(const char * token,int size)701         inline void setKeyFreshToken(const char *token, int size)
702         {
703             intKeyFreshToken.set(token, size);
704         }
setKeyFreshToken(const OSCL_HeapString<SDPParserAlloc> & key)705         inline void setKeyFreshToken(const OSCL_HeapString<SDPParserAlloc> &key)
706         {
707             intKeyFreshToken = key;
708         }
709 
setSdpAuthTag(const OsclMemoryFragment memFrag)710         inline void setSdpAuthTag(const OsclMemoryFragment memFrag)
711         {
712             sdpAuthTag.set((const char *)memFrag.ptr, memFrag.len);
713         }
714 
setSdpAuthTag(const char * tag)715         inline void setSdpAuthTag(const char *tag)
716         {
717             sdpAuthTag = tag;
718         }
719 
setSdpAuthTag(const OSCL_HeapString<SDPParserAlloc> & tag)720         inline void setSdpAuthTag(const OSCL_HeapString<SDPParserAlloc>& tag)
721         {
722             sdpAuthTag = tag;
723         }
724 
setAssetInfo(const AssetInfoType & ainfo)725         inline void setAssetInfo(const AssetInfoType &ainfo)
726         {
727             assetInfo = ainfo;
728         };
729 
getSDPAltGroupType()730         inline SDPAltGroupType getSDPAltGroupType()
731         {
732             return iSDPAltGroupType;
733         }
setSDPAltGroupType(SDPAltGroupType aSDPAltGroupType)734         inline void setSDPAltGroupType(SDPAltGroupType aSDPAltGroupType)
735         {
736             iSDPAltGroupType = aSDPAltGroupType;
737         };
setAltGroupBW(const char * line,int size)738         inline void setAltGroupBW(const char *line, int size)
739         {
740             altGroupBW.set(line, size);
741             setSDPAltGroupType(SDP_ALT_GROUP_BANDWIDTH);
742         }
setAltGroupBW(const OSCL_HeapString<SDPParserAlloc> & line)743         inline void setAltGroupBW(const OSCL_HeapString<SDPParserAlloc>& line)
744         {
745             altGroupBW = line;
746             setSDPAltGroupType(SDP_ALT_GROUP_BANDWIDTH);
747         }
setAltGroupLANG(const char * line,int size)748         inline void setAltGroupLANG(const char *line, int size)
749         {
750             altGroupLANG.set(line, size);
751             setSDPAltGroupType(SDP_ALT_GROUP_LANGUAGE);
752         }
setAltGroupLANG(const OSCL_HeapString<SDPParserAlloc> & line)753         inline void setAltGroupLANG(const OSCL_HeapString<SDPParserAlloc>& line)
754         {
755             altGroupLANG = line;
756             setSDPAltGroupType(SDP_ALT_GROUP_LANGUAGE);
757         }
758 
setCFieldStatus(bool status)759         inline void setCFieldStatus(bool status)
760         {
761             c_field_found = status;
762         }
763 
setMaxprate(OsclFloat rate)764         inline void setMaxprate(OsclFloat rate)
765         {
766             maxprate = rate;
767         }
768         //End additions
769 
getType()770         inline char *getType()
771         {
772             return (char *)type.get_cstr();
773         };
getProtocolVersion()774         inline int getProtocolVersion()
775         {
776             return protocolVersion;
777         };
getOriginator(originatorInfo * orig)778         inline void getOriginator(originatorInfo* orig)
779         {
780             orig->originatorUsername = origInfo.originatorUsername;
781             orig->originatorSessionID = origInfo.originatorSessionID;
782             orig->originatorVersion = origInfo.originatorVersion;
783             orig->originatorNetworkType = origInfo.originatorNetworkType;
784             orig->originatorAddressType = origInfo.originatorAddressType;
785             orig->originatorAddress = origInfo.originatorAddress;
786         }
787 
getOUserName()788         inline const char *getOUserName()
789         {
790             return origInfo.originatorUsername.get_cstr();
791         };
getOSessionID()792         inline uint32 getOSessionID()
793         {
794             return origInfo.originatorSessionID;
795         }
796 
797         //End additions
getSessionName()798         inline char *getSessionName()
799         {
800             return (char *)sessionName.get_cstr();
801         };
getConnectionInformation(connectionInfo * ct)802         inline void getConnectionInformation(connectionInfo* ct)
803         {
804             ct->connectionNetworkType = connectInfo.connectionNetworkType;
805             ct->connectionAddress = connectInfo.connectionAddress;
806             ct->connectionAddressType = connectInfo.connectionAddressType;
807         }
getSessionInformation()808         inline const char *getSessionInformation()
809         {
810             return sessionInformation.get_cstr();
811         };
getVersion()812         inline const char *getVersion() // Modify this to return char
813         {
814             return version.get_cstr();
815         };
getAuthor()816         inline const char *getAuthor()
817         {
818             return author.get_cstr();
819         };
getCopyright()820         inline const char *getCopyright()
821         {
822             return copyright.get_cstr();
823         };
getRating()824         inline const char *getRating()
825         {
826             return rating.get_cstr();
827         };
getStartStopTimes(sessionTime * st)828         inline void getStartStopTimes(sessionTime* st)
829         {
830             st->sessionStartTime = sessionStartTime.get_value();
831             st->sessionStopTime = sessionStopTime.get_value();
832         }
getStartTime()833         inline NTPTime getStartTime()
834         {
835             return sessionStartTime;
836         }
getStopTime()837         inline NTPTime getStopTime()
838         {
839             return sessionStopTime;
840         }
getStartStopTimes(uint64 * start,uint64 * stop)841         inline void getStartStopTimes(uint64 *start, uint64 *stop)
842         {
843             *start = sessionStartTime.get_value();
844             *stop = sessionStopTime.get_value();
845         };
846 
847         // added for RM
getASMRuleBool()848         inline const char *getASMRuleBool()
849         {
850             return ASMRuleBook.get_cstr();
851         }
852 
getTitle()853         inline const char *getTitle()
854         {
855             return Title.get_cstr();
856         }
857 
getKeywords()858         inline const char *getKeywords()
859         {
860             return Keywords.get_cstr();
861         }
862 
getAbstract()863         inline const char *getAbstract()
864         {
865             return Abstract.get_cstr();
866         }
867 
getSdpplinVersion()868         inline uint32 getSdpplinVersion()
869         {
870             return SdpplinVersion;
871         }
872 
getStreamCount()873         inline uint32 getStreamCount()
874         {
875             return StreamCount;
876         }
877 
getFlags()878         inline uint32 getFlags()
879         {
880             return Flags;
881         }
882 
getIsRealDataType()883         inline uint32 getIsRealDataType()
884         {
885             return IsRealDataType;
886         }
887 
888         // end
convertNTPValueToMilliSeconds(uint64 ntp_value)889         inline uint32 convertNTPValueToMilliSeconds(uint64 ntp_value)
890         {
891             uint32 ntp_value_upper =
892                 Oscl_Int64_Utils::get_uint64_upper32(ntp_value);
893 
894             uint32 ntp_value_lower =
895                 Oscl_Int64_Utils::get_uint64_lower32(ntp_value);
896 
897             MediaClockConverter mediaClockConverter;
898             /*
899              * Convert Time stamp to milliseconds
900              */
901             mediaClockConverter.update_clock(ntp_value_upper);
902             uint32 ntp_value_upper_ms =
903                 mediaClockConverter.get_converted_ts(1000);
904 
905             /*
906              * lower 32 bits are actually in a time scale of 2^32
907              * limit precision of lower_32 to just 10 bits
908              */
909             ntp_value_lower >>= 22;
910             mediaClockConverter.set_timescale(1024);
911             mediaClockConverter.update_clock(ntp_value_lower);
912             uint32 ntp_value_lower_ms =
913                 mediaClockConverter.get_converted_ts(1000);
914 
915             return (ntp_value_upper_ms + ntp_value_lower_ms);
916         }
917 
getSessionDurationInMilliSeconds()918         inline uint32 getSessionDurationInMilliSeconds()
919         {
920             NTPTime startTimeNTP = getStartTime();
921             NTPTime stopTimeNTP  = getStopTime();
922 
923             uint64 duration_64 = (stopTimeNTP.get_value() -
924                                   startTimeNTP.get_value());
925 
926             return (convertNTPValueToMilliSeconds(duration_64));
927         }
928 
getSessionStartTimeInMilliSeconds()929         inline uint32 getSessionStartTimeInMilliSeconds()
930         {
931             NTPTime startTimeNTP = getStartTime();
932             uint64 session_start = startTimeNTP.get_value();
933             return (convertNTPValueToMilliSeconds(session_start));
934         }
935 
getSessionStopTimeInMilliSeconds()936         inline uint32 getSessionStopTimeInMilliSeconds()
937         {
938             NTPTime stopTimeNTP  = getStopTime();
939             uint64 session_stop = stopTimeNTP.get_value();
940             return (convertNTPValueToMilliSeconds(session_stop));
941         }
942 
getSessionRepeatInterval()943         inline uint32 getSessionRepeatInterval()
944         {
945             return (repeatInterval);
946         };
getSessionActiveDuration()947         inline uint32 getSessionActiveDuration()
948         {
949             return (activeDuration);
950         };
getRepeatTimeOffsetVectors()951         inline Oscl_Vector<uint32, SDPParserAlloc> getRepeatTimeOffsetVectors()
952         {
953             return (listOfOffsetsFromStartTime);
954         };
955 
getRange()956         inline const RtspRangeType* getRange()
957         {
958             return &session_range;
959         }
getWmfVersion()960         inline const char *getWmfVersion()
961         {
962             return wmfVersion.get_cstr();
963         };
getAllowRecord()964         inline bool getAllowRecord()
965         {
966             return allowRecord;
967         };
getRandomAccessDenied()968         inline bool getRandomAccessDenied()
969         {
970             return randomAccessDenied;
971         };
getVideoOnlyAllowed()972         inline VideoOnlyStatus getVideoOnlyAllowed()
973         {
974             return videoOnlyAllowed;
975         };
getControlURL()976         inline const char *getControlURL()
977         {
978             return controlURL.get_cstr();
979         };
getCreationDate()980         inline const char *getCreationDate()
981         {
982             return creationDate.get_cstr();
983         }
984 
985 
986 
getETag()987         inline const char *getETag()
988         {
989             return eTag.get_cstr();
990         }
991 
getRandomFiller()992         inline const char *getRandomFiller()
993         {
994             return randomFiller.get_cstr();
995         }
996 
getDigitalSignature()997         inline const char *getDigitalSignature()
998         {
999             return digitalSignature.get_cstr();
1000         }
1001 
getLaunchURL()1002         inline const char *getLaunchURL()
1003         {
1004             return launchURL.get_cstr();
1005         }
1006 
getEndOfClipAction()1007         inline EndOfClipAction getEndOfClipAction()
1008         {
1009             return endOfClip;
1010         }
1011 
getAppSpecificString()1012         inline const char *getAppSpecificString()
1013         {
1014             return appSpecificString.get_cstr();
1015         }
1016 
getExpiryDate()1017         inline const char *getExpiryDate()
1018         {
1019             return expiryDate.get_cstr();
1020         }
1021 
getPauseDenied()1022         inline bool getPauseDenied()
1023         {
1024             return pauseDenied;
1025         }
getEmail()1026         inline const char *getEmail()
1027         {
1028             return email.get_cstr();
1029         }
getPhoneNumber()1030         inline const char *getPhoneNumber()
1031         {
1032             return phoneNumber.get_cstr();
1033         }
getEncryptionKey()1034         inline const char* getEncryptionKey()
1035         {
1036             return encryptionKey.get_cstr();
1037         }
1038 
getBitRate()1039         inline int getBitRate()
1040         {
1041             return (bitrate);
1042         }
getRTCPBWSender()1043         inline int getRTCPBWSender()
1044         {
1045             return (rtcpBWSender);
1046         }
getRTCPBWReceiver()1047         inline int getRTCPBWReceiver()
1048         {
1049             return (rtcpBWReceiver);
1050         }
getBWtias()1051         inline int getBWtias()
1052         {
1053             return BWtias;
1054         }
1055 
getQoEMetrics()1056         inline QoEMetricsType &getQoEMetrics()
1057         {
1058             return qoeMetrics ;
1059         }
1060 
getAssetInfo()1061         inline AssetInfoType &getAssetInfo()
1062         {
1063             return assetInfo;
1064         };
1065 
getAltGroupBW()1066         inline const char* getAltGroupBW()
1067         {
1068             return altGroupBW.get_cstr();
1069         }
getAltGroupLANG()1070         inline const char* getAltGroupLANG()
1071         {
1072             return altGroupLANG.get_cstr();
1073         }
getAltGroupBWLength()1074         inline int getAltGroupBWLength()
1075         {
1076             return altGroupBW.get_size();
1077         }
getAltGroupLANGLength()1078         inline int getAltGroupLANGLength()
1079         {
1080             return altGroupLANG.get_size();
1081         }
getSdpAuthTag()1082         inline const char* getSdpAuthTag()
1083         {
1084             return sdpAuthTag.get_cstr();
1085         }
1086 
getCFieldStatus()1087         inline bool getCFieldStatus()
1088         {
1089             return c_field_found;
1090         }
getSessionURI()1091         inline const char* getSessionURI()
1092         {
1093             return sessionURI.get_cstr();
1094         }
getintKeyMethod()1095         inline const char* getintKeyMethod()
1096         {
1097             return intKeyMethod.get_cstr();
1098         }
getintKeyFreshToken()1099         inline const char* getintKeyFreshToken()
1100         {
1101             return intKeyFreshToken.get_cstr();
1102         }
getintKeyData()1103         inline const char* getintKeyData()
1104         {
1105             return intKeyData.get_cstr();
1106         }
getintKeyRightIssuerURI()1107         inline const char* getintKeyRightIssuerURI()
1108         {
1109             return intKeyRightIssuerURI.get_cstr();
1110         }
getintKeyContentIdURI()1111         inline const char* getintKeyContentIdURI()
1112         {
1113             return intKeyContentIdURI.get_cstr();
1114         }
getMaxprate()1115         inline OsclFloat getMaxprate()
1116         {
1117             return maxprate;
1118         }
1119         //End additions
1120 
1121         //Additions for asf streaming
setAsfHeader(unsigned char * ASCPtr,int ASCLen)1122         inline void setAsfHeader(unsigned char* ASCPtr, int ASCLen)
1123         {
1124             asfHeaderPtr = ASCPtr;
1125             asfHeaderSize = ASCLen;
1126         };
getAsfHeader()1127         inline unsigned char *getAsfHeader()
1128         {
1129             return asfHeaderPtr;
1130         }
getAsfHeaderSize()1131         inline int getAsfHeaderSize()
1132         {
1133             return asfHeaderSize;
1134         }
setAsfTrue(bool asfFlag)1135         inline void setAsfTrue(bool asfFlag)
1136         {
1137             asfTrue = asfFlag;
1138         }
getAsfTrue()1139         inline bool getAsfTrue()
1140         {
1141             return asfTrue;
1142         }
1143 
setSDPFilename(const OSCL_HeapString<SDPParserAlloc> & filename)1144         inline void setSDPFilename(const OSCL_HeapString<SDPParserAlloc>& filename)
1145         {
1146             SdpFilename = filename;
1147         }
1148 
setSDPFilename(const OsclMemoryFragment memFrag)1149         inline void setSDPFilename(const OsclMemoryFragment memFrag)
1150         {
1151             SdpFilename.set((const char*)(memFrag.ptr), memFrag.len);
1152         }
1153 
resetSessionDescription()1154         inline void resetSessionDescription()
1155         {
1156             // NTPTime time; // used to initialize the originatorSessionID
1157 
1158             protocolVersion = 0;
1159             rating = "Not Rated";
1160 
1161             sessionStartTime = (uint64)0;
1162             sessionStopTime = (uint64)0;
1163 
1164             sessionName = "N/A";
1165             sessionInformation = "N/A";
1166             version = "N/A";
1167             author = "N/A";
1168             copyright = "N/A";
1169 
1170             wmfVersion = "1.2";
1171 
1172             allowRecord = false;
1173             randomAccessDenied = false;
1174             videoOnlyAllowed = NOT_PRESENT;
1175             controlURL = "*";
1176 
1177             session_range.format = RtspRangeType::INVALID_RANGE;
1178             session_range.start_is_set = session_range.end_is_set = false;
1179 
1180             origInfo.originatorUsername = "-";
1181             //origInfo.originatorSessionID =  time.get_upper32();
1182             //origInfo.originatorVersion = time.get_lower32();
1183             origInfo.originatorSessionID = (uint32)0;
1184             origInfo.originatorVersion = (uint32) 0;
1185             origInfo.originatorNetworkType = "IN";
1186             origInfo.originatorAddressType = "IP4";
1187             origInfo.originatorAddress = "0.0.0.0";
1188 
1189             connectInfo.connectionNetworkType = "IP";
1190             connectInfo.connectionAddress = "0.0.0.0";
1191             connectInfo.connectionAddressType = "IP4";
1192 
1193             //    securityFlag = 0;
1194             pauseDenied = false;
1195             eTag = NULL;
1196             randomFiller = NULL;
1197             digitalSignature = NULL;
1198             launchURL = NULL;
1199             //Added new enum state.
1200             endOfClip = DO_NOTHING;
1201             appSpecificString = NULL;
1202             email = "support@localhost";
1203             //End additions
1204 
1205             // ASF
1206             asfHeaderSize = 0;
1207             asfHeaderPtr = NULL;
1208             asfTrue = false;
1209 
1210             bitrate = 0;
1211             rtcpBWSender = -1;
1212             rtcpBWReceiver = -1;
1213             BWtias = 0;
1214             repeatInterval = 0;
1215             activeDuration = 0;
1216 
1217             intKeyFreshToken = NULL;
1218             intKeyMethod = NULL;
1219             intKeyData = NULL;
1220             intKeyContentIdURI = NULL;
1221             intKeyRightIssuerURI = NULL;
1222             sdpAuthTag = NULL;
1223 
1224             assetInfo.ResetAssetInfoType();
1225 
1226             iSDPAltGroupType = SDP_ALT_GROUP_NONE;
1227             altGroupBW = NULL;
1228             altGroupLANG = NULL;
1229             c_field_found = false;
1230             oscl_memset(qoeMetrics.name, 0, 7);
1231             qoeMetrics.rateFmt = QoEMetricsType::VAL;
1232             qoeMetrics.rateVal = 0;
1233             qoeMetrics.paramFmt = QoEMetricsType::IDIGIT;
1234             qoeMetrics.paramExtIdigit = 0;
1235 
1236         }
1237 
sessionDescription(const sessionDescription & sourceSessionDescription)1238         sessionDescription(const sessionDescription & sourceSessionDescription)
1239         {
1240             setProtocolVersion(((sessionDescription)sourceSessionDescription).getProtocolVersion());
1241             setSessionName(((sessionDescription)sourceSessionDescription).getSessionName());
1242             setSessionInformation(((sessionDescription)sourceSessionDescription).getSessionInformation());
1243             setVersion(((sessionDescription)sourceSessionDescription).getVersion());
1244             setAuthor(((sessionDescription)sourceSessionDescription).getAuthor());
1245             setCopyright(((sessionDescription)sourceSessionDescription).getCopyright());
1246             setRating(((sessionDescription)sourceSessionDescription).getRating());
1247             uint64 start, stop;
1248             ((sessionDescription)sourceSessionDescription).getStartStopTimes(&start, &stop);
1249             setSessionStartTime(start);
1250             setSessionStopTime(stop);
1251 
1252             setRepeatInterval(((sessionDescription)sourceSessionDescription).getSessionRepeatInterval());
1253             setActiveDuration(((sessionDescription)sourceSessionDescription).getSessionActiveDuration());
1254             setOffsetVector(((sessionDescription)sourceSessionDescription).getRepeatTimeOffsetVectors());
1255 
1256             setRange(*((sessionDescription)sourceSessionDescription).getRange());
1257             setWmfVersion(((sessionDescription)sourceSessionDescription).getWmfVersion());
1258             setAllowRecord(((sessionDescription)sourceSessionDescription).getAllowRecord());
1259             setVideoOnlyAllowed(((sessionDescription)sourceSessionDescription).getVideoOnlyAllowed());
1260             setControlURL(((sessionDescription)sourceSessionDescription).getControlURL());
1261 
1262             originatorInfo originator;
1263             ((sessionDescription)sourceSessionDescription).getOriginator(&originator);
1264             setOUsername(originator.originatorUsername);
1265             //Check the following 2 fields for validity
1266             setOSessionID(originator.originatorSessionID);
1267             setOVersion(originator.originatorVersion);
1268             setONetworkType(originator.originatorNetworkType);
1269             setOAddressType(originator.originatorAddressType);
1270             setOAddress(originator.originatorAddress);
1271 
1272             connectionInfo connection;
1273             ((sessionDescription)sourceSessionDescription).getConnectionInformation(&connection);
1274             setCNetworkType(connection.connectionNetworkType);
1275             setCAddressType(connection.connectionAddressType);
1276             setCAddress(connection.connectionAddress);
1277 
1278             setCreationDate(((sessionDescription)sourceSessionDescription).getCreationDate());
1279             setRandomAccessDenied(((sessionDescription)sourceSessionDescription).getRandomAccessDenied());
1280             setETag(((sessionDescription)sourceSessionDescription).getETag());
1281             setRandomFiller(((sessionDescription)sourceSessionDescription).getRandomFiller());
1282             setDigitalSignature(((sessionDescription)sourceSessionDescription).getDigitalSignature());
1283             setLaunchURL(((sessionDescription)sourceSessionDescription).getLaunchURL());
1284             setEndOfClipAction(((sessionDescription)sourceSessionDescription).getEndOfClipAction());
1285             setAppSpecificString(((sessionDescription)sourceSessionDescription).getAppSpecificString());
1286             setExpiryDate(((sessionDescription)sourceSessionDescription).getExpiryDate());
1287             setPauseDenied(((sessionDescription)sourceSessionDescription).getPauseDenied());
1288             setEmail(((sessionDescription)sourceSessionDescription).getEmail());
1289             setPhoneNumber(((sessionDescription)sourceSessionDescription).getPhoneNumber());
1290             setEncryptionKey(((sessionDescription)sourceSessionDescription).getEncryptionKey());
1291 
1292             setBitrate(((sessionDescription)sourceSessionDescription).getBitRate());
1293             setRTCPSenderBitRate(((sessionDescription)sourceSessionDescription).getRTCPBWSender());
1294             setRTCPReceiverBitRate(((sessionDescription)sourceSessionDescription).getRTCPBWReceiver());
1295             setBWtias(((sessionDescription)sourceSessionDescription).getBWtias());
1296             //Additions for asf streaming
1297             setAsfHeader(((sessionDescription)sourceSessionDescription).getAsfHeader(), ((sessionDescription)sourceSessionDescription).getAsfHeaderSize()) ;
1298             setAsfTrue(((sessionDescription)sourceSessionDescription).getAsfTrue());
1299 
1300             setQoEMetrics(sourceSessionDescription.qoeMetrics);
1301 
1302             setKeyMethod(sourceSessionDescription.intKeyMethod);
1303 
1304             setKeyData(sourceSessionDescription.intKeyData);
1305 
1306             setKeyContentIdURI(sourceSessionDescription.intKeyContentIdURI);
1307             setKeyRightIssuerURI(sourceSessionDescription.intKeyRightIssuerURI);
1308 
1309             setAssetInfo(((sessionDescription)sourceSessionDescription).getAssetInfo());
1310 
1311             setSdpAuthTag(((sessionDescription)sourceSessionDescription).getSdpAuthTag());
1312 
1313             setSDPAltGroupType(((sessionDescription)sourceSessionDescription).getSDPAltGroupType());
1314             setAltGroupBW(((sessionDescription)sourceSessionDescription).getAltGroupBW());
1315             setAltGroupLANG(((sessionDescription)sourceSessionDescription).getAltGroupLANG());
1316 
1317             setCFieldStatus(((sessionDescription)sourceSessionDescription).getCFieldStatus());
1318             setMaxprate(((sessionDescription)sourceSessionDescription).getMaxprate());
1319 
1320         }
1321 
1322         const sessionDescription &operator=(const sessionDescription & sourceSessionDescription)
1323         {
1324             protocolVersion = sourceSessionDescription.protocolVersion;
1325             sessionName = sourceSessionDescription.sessionName;
1326             sessionInformation = sourceSessionDescription.sessionInformation;
1327             version = sourceSessionDescription.version;
1328             author = sourceSessionDescription.author;
1329             copyright = sourceSessionDescription.copyright;
1330             rating = sourceSessionDescription.rating;
1331             sessionStartTime = sourceSessionDescription.sessionStartTime.get_value();
1332             sessionStopTime = sourceSessionDescription.sessionStopTime.get_value();
1333 
1334             repeatInterval = sourceSessionDescription.repeatInterval;
1335             activeDuration = sourceSessionDescription.activeDuration;
1336             listOfOffsetsFromStartTime = sourceSessionDescription.listOfOffsetsFromStartTime;
1337 
1338             session_range = sourceSessionDescription.session_range;
1339             wmfVersion = sourceSessionDescription.wmfVersion;
1340             allowRecord = sourceSessionDescription.allowRecord;
1341             videoOnlyAllowed = sourceSessionDescription.videoOnlyAllowed;
1342             controlURL = sourceSessionDescription.controlURL;
1343             origInfo.originatorUsername = sourceSessionDescription.origInfo.originatorUsername;
1344             origInfo.originatorSessionID = sourceSessionDescription.origInfo.originatorSessionID;
1345             origInfo.originatorVersion = sourceSessionDescription.origInfo.originatorVersion;
1346             origInfo.originatorNetworkType = sourceSessionDescription.origInfo.originatorNetworkType;
1347             origInfo.originatorAddressType = sourceSessionDescription.origInfo.originatorAddressType;
1348             origInfo.originatorAddress = sourceSessionDescription.origInfo.originatorAddress;
1349             connectInfo.connectionNetworkType = sourceSessionDescription.connectInfo.connectionNetworkType;
1350             connectInfo.connectionAddressType = sourceSessionDescription.connectInfo.connectionAddressType;
1351             connectInfo.connectionAddress = sourceSessionDescription.connectInfo.connectionAddress;
1352             creationDate = sourceSessionDescription.creationDate;
1353             randomAccessDenied = sourceSessionDescription.randomAccessDenied;
1354             eTag =  sourceSessionDescription.eTag;
1355             randomFiller = sourceSessionDescription.randomFiller;
1356             digitalSignature = sourceSessionDescription.digitalSignature;
1357             launchURL = sourceSessionDescription.launchURL;
1358             endOfClip = sourceSessionDescription.endOfClip;
1359             appSpecificString = sourceSessionDescription.appSpecificString;
1360             expiryDate = sourceSessionDescription.expiryDate;
1361             pauseDenied = sourceSessionDescription.pauseDenied;
1362             email = sourceSessionDescription.email;
1363             phoneNumber = sourceSessionDescription.phoneNumber;
1364             encryptionKey = sourceSessionDescription.encryptionKey;
1365             bitrate = sourceSessionDescription.bitrate;
1366             rtcpBWSender =  sourceSessionDescription.rtcpBWSender;
1367             rtcpBWReceiver = sourceSessionDescription.rtcpBWReceiver;
1368             BWtias = sourceSessionDescription.BWtias;
1369             asfHeaderPtr = sourceSessionDescription.asfHeaderPtr;
1370             asfHeaderSize = sourceSessionDescription.asfHeaderSize;
1371             asfTrue = sourceSessionDescription.asfTrue;
1372             qoeMetrics = sourceSessionDescription.qoeMetrics;
1373             Keywords =  sourceSessionDescription.Keywords;
1374             intKeyData = sourceSessionDescription.intKeyData;
1375             intKeyContentIdURI = sourceSessionDescription.intKeyContentIdURI;
1376             intKeyRightIssuerURI = sourceSessionDescription.intKeyRightIssuerURI;
1377             assetInfo = sourceSessionDescription.assetInfo;
1378             sdpAuthTag = sourceSessionDescription.sdpAuthTag;
1379             iSDPAltGroupType = sourceSessionDescription.iSDPAltGroupType;
1380             c_field_found = sourceSessionDescription.c_field_found;
1381             maxprate = sourceSessionDescription.maxprate;
1382             altGroupBW = sourceSessionDescription.altGroupBW;
1383             altGroupLANG = sourceSessionDescription.altGroupLANG;
1384             iSDPAltGroupType = sourceSessionDescription.iSDPAltGroupType;
1385             return *this;
1386         }
1387 
1388 };
1389 
1390 #endif
1391